--runtime or --use-current-runtime with --sc or --selfcontained gives warning warning NETSDK1179: One of '--self-contained' or '--no-self -contained' options are required when '--runtime' is used.
See original GitHub issue.NET 7 prev. 3 Microsoft ® Build Engine version 17.2.0-preview-22175-02+058a0262c for .NET
UPDATE: maybe I should use --no-self-contained
with these projects. I don’t know.
Building a project on Windows or L:inux with --runtime <runtime identifier>
or --use-current-runtime
and with --sc
or --selfcontained
gives warning:
- warning
NETSDK1179: One of '--self-contained' or '--no-self -contained' options are required when '--runtime' is used.
Sample command line
dotnet build FluentUI.Demo.Shared.csproj --use-current-runtime --sc -o test
Full error:
C:\Program Files\dotnet\sdk\7.0.100-preview.3.22179.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(1113,5): warning NETSDK1179: One of '--self-contained' or '--no-self -contained' options are required when '--runtime' is used. [C:\Users\jdkra\Downloads\fast-blazor-main\examples\FluentUI.Demo.Shared\FluentUI.Demo.Shared.csproj]
Using --no-selfcontained
works as it should.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top GitHub Comments
This will be fixed in the 6.0.301 release because of this merged PR.
I’m getting this issue in 6.0.400, but perhaps not in a situation that was expected:
You will notice that it’s building a dependent project here which is an exe (a tool used as part of the build process), and it seems it doesn’t get the flag (but I don’t care because it’s not used in the output)