✅ my application in the assembly works fine on my PC, BUT
my application in the assembly works fine on my PC, but opens for a few seconds and closes if I try to run the exe file on another PC
and no it's not because I forgot to set the action wait in the program I created a simple program and hello world with reading the line and it also immediately closes
21 Replies
my application in the assembly works fine on my PC, opens for a few seconds and closes if I try to run the exe file on another PC
and no it's not because I forgot to set the action wait in the program I created a simple program and hello world with reading the line and it also immediately closes
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
a code or exe file ?
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
okey 1 sec
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
GitHub
GitHub - LuxiPyw/weather-api
Contribute to LuxiPyw/weather-api development by creating an account on GitHub.
hey dude what's there?
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
okey sorry
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
and a try this
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
=> $singlefile
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
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
Thanks a lot dude!
Unknown User•4w 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