✅ Is it possible to clean up all this in a vs release folder?
I just want the exe file, can it be done?
6 Replies
$singlefile
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: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
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
If you have no further questions, please use /close to mark the forum thread as answered
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
If you have no further questions, please use /close to mark the forum thread as answered