FluentFTP icon indicating copy to clipboard operation
FluentFTP copied to clipboard

FluentFTP.dll produced trim warnings

Open Reelix opened this issue 2 years ago • 2 comments

FTP Server OS: N/A

FTP Server Type: N/A

Client Computer OS: Windows (Compiling for Linux ARM64)

FluentFTP Version: 48.0.3 (nuget)

Framework: .NET 8

When including FluentFTP in a project and publishing for a self-contained trimmed application, the following warning message appears.

.nuget\packages\fluentftp\48.0.3\lib\net6.0\FluentFTP.dll : warning IL2104: Assembly 'FluentFTP' produced
trim warnings. For more information see https://aka.ms/dotnet-illink/libraries

Reelix avatar Nov 15 '23 12:11 Reelix

This is FOSS. Not commercial software. So if you can suggest a fix we can look into it.

I tried reading this but its too long drawn to draw any specific suggestions: https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/fixing-warnings

robinrodricks avatar Nov 16 '23 09:11 robinrodricks

FTP Server OS: N/A

FTP Server Type: N/A

Client Computer OS: Windows (Compiling for Linux ARM64)

FluentFTP Version: 48.0.3 (nuget)

Framework: .NET 8

When including FluentFTP in a project and publishing for a self-contained trimmed application, the following warning message appears.

.nuget\packages\fluentftp\48.0.3\lib\net6.0\FluentFTP.dll : warning IL2104: Assembly 'FluentFTP' produced
trim warnings. For more information see https://aka.ms/dotnet-illink/libraries

Hello! if you try to make trimmed WPF application or whatever GUI application with C#, you cannot do that because Microsoft by themself told to not to. Right now only console apps you can publish as trimmed. But with WPF or any other GUI you can forget not possible. Maybe .NET MAUI, but that's a big question.

Example you can see in: Alliance Uploader, FluentFTP based project to upload files securely. It uses C# console to trim application to consume less space on disk. You can see the file size in Releases. Also project itself sends files more nice then FileZilla. Because for me, FileZilla transfers some files with not enough bytes, resulting corrupted sounds. This project fix everything.

J0nathan550 avatar Jan 27 '24 13:01 J0nathan550

OK, no idea what to do here. We cannot "trim" FluentFTP so closing this for now.

robinrodricks avatar Aug 07 '24 07:08 robinrodricks