Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tomshane opened this issue Feb 28, 2025 · 3 comments
Open

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

tomshane opened this issue Feb 28, 2025 · 3 comments
Labels

Comments

@tomshane
Copy link

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 tomshane added the bug label Feb 28, 2025
@AmbroziuBaban
Copy link

@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.

@tomshane
Copy link
Author

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

@AmbroziuBaban
Copy link

AmbroziuBaban commented Mar 24, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants