WhiteBlackGoose
WhiteBlackGoose
Explore posts from servers
CC#
Created by WhiteBlackGoose on 11/10/2022 in #help
❔ [SOLVED] Reducing the size of an executable
hello there what are my options to reduce the size of an executable? Here's how I publish it
dotnet publish \
-r $1 \
-c release \
-o ./publish-output \
-p:SelfContained=true \
-p:PublishAot=true \
-p:PublishTrimmed=true
dotnet publish \
-r $1 \
-c release \
-o ./publish-output \
-p:SelfContained=true \
-p:PublishAot=true \
-p:PublishTrimmed=true
11 replies
CC#
Created by WhiteBlackGoose on 11/10/2022 in #help
❔ [SOLVED] PublishAot and PublishSingleFile at thesame time
I have a very simple app and I want to reduce its size and have a good start up time. Here's my current publish script:
dotnet publish \
-r $1 \
-c release \
-o ./native-out \
-p:PublishReadyToRun=true \
-p:SelfContained=true \
-p:PublishSingleFile=true \
-p:PublishTrimmed=true \
-p:TrimMode=link
dotnet publish \
-r $1 \
-c release \
-o ./native-out \
-p:PublishReadyToRun=true \
-p:SelfContained=true \
-p:PublishSingleFile=true \
-p:PublishTrimmed=true \
-p:TrimMode=link
I do R2R, but I'd like to use PublishAot instead, which returns an error that it cannot use PublishAot and PublishSingleFile at the same time. What's the latest way to reduce size as much as possible and have a good start up time? SDK 7.0.100
13 replies