C
C#3mo ago
MerryToad

✅ Is it possible to clean up all this in a vs release folder?

I just want the exe file, can it be done?
No description
6 Replies
Buddy
Buddy3mo ago
$singlefile
MODiX
MODiX3mo ago
dotnet publish -c Release -r <runtime identifier> -p:PublishSingleFile=true Use of -p:PublishSingleFile=true implies --self-contained true. Add --self-contained false to publish as runtime-dependent. -r RID and -p:PublishSingleFile=true can be moved to .csproj as the following properties:
<RuntimeIdentifier>RID</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>RID</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
but to target multiple RIDs, you have to use dotnet publish with the -r option for each RID. You can also add -p:IncludeNativeLibrariesForSelfExtract=true to include native libraries (like Common Language Runtime dlls) in the output executable, but be aware of drawbacks and consider using an installer framework instead of that property with PublishSingleFile. You might want to instead publish your application compiled Ahead Of Time to native code, see $nativeaot for examples. Single file publishing | Runtime Identifier (RID) catalog | dotnet publish
Kiel
Kiel3mo ago
It looks like you're using Humanizer, it might help to install Humanizer.Core if you JUST want english-language features - it won't produce just an exe file like above mentioned but it will at least keep all those extra folders from being generated
MODiX
MODiX3mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX3mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server