Minor issue with FtpProfile.ToCode()
FTP Server OS: Windows 2016 / 2019 - IIS 10.0 FTP Server Type: Unknown FluentFTP Version: FluentFTP 54.1.1.0(.NET 8.0+) Client Computer OS: Windows 11, running VS 2022 17.14.31 (April 2026) Framework: .NET 9, Maui App Target: Android 15, both emulator and phone device (Galaxy S25)
First off, thanks for a solid, full-featured FTP client!.
I found a very minor problem with the code emitted by FtpProfile.ToCode(). The profile returned by a successful call to AsyncFtpClient.AutoConnect(), emitted the following via ToCode():
client.LoadProfile(new FtpProfile {
Host = "host",
Credentials = new NetworkCredential("user", "pwd"),
Encryption = FtpEncryptionMode.Auto,
Protocols = SslProtocols.Tls12,
DataConnection = FtpDataConnectionType.PASV,
Encoding = System.Text.UTF8Encoding,
});
That last line should be:
Encoding = System.Text.UTF8Encoding.UTF8,
Thanks!
Isn't "System.Text.UTF8Encoding.UTF8" exactly what you get when you use the equivalent "System.Text.UTF8Encoding"?
Yes agreed. I get this error 'UTF8Encoding' is a type, which is not valid in the given context
Should be fixed in 54.1.2 https://www.nuget.org/packages/FluentFTP/54.1.2