4 ms·
Looks like I am installing Windows. One thing that has kept me away from getting into .NET terminal & desktop apps is the binary size. Even a hello world app i
by longrod 4y ago
Looks like I am installing Windows.
One thing that has kept me away from getting into .NET terminal & desktop apps is the binary size. Even a hello world app is quite big compared to Go, Rust etc.
- kevingadd 4y agoThis confuses me - I have a .net app with useful functionality that I wrote in 2007 and it's a 24kb EXE file with no dependencies other than the runtime. Are you using heavy weight libraries/packages?
- lewispollard 4y ago> it's a 24kb EXE file with no dependencies other than the runtime Presumably they're publishing it as a framework independent binary, which includes the runtime
- viraptor 4y agoYou've got a few options. 1. Every windows 10 these days will have .net framework 4.8, so you can ship just your app. If you're going core, you could try .net 7 and assembly trying + ReadyToRun - I'm not sure how much that's saving but it's supposed to be much better than .net 6 which failed in that case.
- asabla 4y agoWell it depends on how you publish your application. Example: dotnet publish -c Release -r linux-x64 --self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:DebugType=None -p:DebubSymbols=false Will produce a single file which (with only Hell world) is around 62MB. While: dotnet publish -c Release -r linux-x64 --no-self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:DebugType=None -p:DebubSymbols=false (Notice --no-self-contained), will produce a single file which should be around 146KB. So it all comes down to including the whole runtime or not while publishing. And then there is AOT (Ahead of time) option for the upcoming .Net 7, which will reduce self-contained files significantly. Ref: https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-preview-3/#prepare-your-apps-for-native-aot https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-pr...
- deleted 4y ago[deleted]