C
C#3y ago
hanu

What is the most common way to distribute .NET 6 application to general people?

If I make my application with .NET 6, i think i should public them with self-contained option, which significantly grows the size of the files i share, so that other people to use my app, because .NET 6 is not included in Windows updates. Is this the right way to distribute my app, or is there a better way that i can reduce the file size?
6 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
TheBoxyBear
TheBoxyBear3y ago
English please @fox
Mayor McCheese
Probably have both options; let the user decide what fits them best, the self contained option or not.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX3y ago
dotnet publish -c Release -r <runtime identifier> -p:PublishSingleFile=true Use of -r|--runtime 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. https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file https://docs.microsoft.com/en-us/dotnet/core/rid-catalog https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
Create a single file for application deployment - .NET
Learn what single file application is and why you should consider using this application deployment model.
.NET Runtime Identifier (RID) catalog
Learn about the Runtime Identifier (RID) and how RIDs are used in .NET.
hanu
hanuOP3y ago
wow thanks

Did you find this page helpful?