ElectronNET/Electron.NET

"--self-contained" always present on the command line

Closed this issue · 4 comments

I'm using the latest version and no matter what arguments I add in the command line, I can't get rid of automatically added --self-contained parameter.

I tried:

* electronize build /target win /dotnet-publish --no-self-contained
* electronize build /target win /dotnet-publish --self-contained false
* electronize build /target win /PublishSingleFile false /PublishReadyToRun false /dotnet-publish --self-contained false
* electronize build /target win /PublishSingleFile false /PublishReadyToRun false /dotnet-publish --no-self-contained

Everytime --self-contained is added to the command:

dotnet publish -r win-x64 -c "Release" --output "C:\Downloads\ReactApp2\ReactApp2.Server\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained

@tomshane is there an use case in which you wound want the app to be framework dependent and not include it in your build? (aka --no-self-contained)?

I've prepared a PR in case there is a business use case for this.

I want to make the bundle to be smaller for download and let users download .NET runtime separately, when needed.

According to this PR there is already a fix in the Develop branch. Seems like it's using the param /p:SelfContained instead of the usual --self-contained.

Since the ElectronNET.CLI is using the Windows/DOS-style ( / in front of the option), the --self-contained, --no-self-contained, --sc options are not supported.

Outdated - use ElectronNET.Core and ElectronNET.Core.AspNet.

See Wiki / What's New.