You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The warning NETSDK1179 is always raised when the --runtime switch is used, even if --self-contained or --no-self-contained is also used. This started in the 6.0.300 stable release, and unconditionally: when the --self-contained switch is used, when the --no-self-contained switch is used, or when neither switch is used. It's impossible to get warning-free behavior. In a typical CI scenario, where warnings are treated as errors, this bug unconditionally fails all builds.
To Reproduce
% cat Test1.csproj ## no other files in the project
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
% dotnet --version
6.0.300
% dotnet build --self-contained --runtime osx-x64
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Restored /Users/nagya/ms/Test1B/Test1.csproj (in 115 ms).
/usr/local/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1114,5): warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. [Test1.csproj]
Test1 -> /Users/nagya/ms/Test1B/bin/Debug/net6.0/osx-x64/Test1.dll
Build succeeded.
/usr/local/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1114,5): warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. [Test1.csproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.09
%
Exceptions (if any)
Further technical details
% dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.300
Commit: 8473146e7d
Runtime Environment:
OS Name: Mac OS X
OS Version: 12.3
OS Platform: Darwin
RID: osx.12-x64
Base Path: /usr/local/share/dotnet/sdk/6.0.300/
Host (useful for support):
Version: 6.0.5
Commit: 70ae3df4a6
.NET SDKs installed:
6.0.300 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
The text was updated successfully, but these errors were encountered:
Describe the bug
The warning
NETSDK1179
is always raised when the--runtime
switch is used, even if--self-contained
or--no-self-contained
is also used. This started in the 6.0.300 stable release, and unconditionally: when the--self-contained
switch is used, when the--no-self-contained
switch is used, or when neither switch is used. It's impossible to get warning-free behavior. In a typical CI scenario, where warnings are treated as errors, this bug unconditionally fails all builds.To Reproduce
Exceptions (if any)
Further technical details
The text was updated successfully, but these errors were encountered: