sdk icon indicating copy to clipboard operation
sdk copied to clipboard

dotnet test with --runtime results in self-contained warning while --os and --arch don't

Open MichalPetryka opened this issue 3 years ago • 0 comments

Describe the bug

Running dotnet test with the --runtime parameter results in the warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used. warning. Doing the same using either or both --os and --arch instead, which are supposed to be short-hands for --runtime results in no warnings. I think that this warning doesn't make sense so removing it from --runtime would be better than adding it to the other paramaters.

To Reproduce

dotnet new xunit -o Test
cd Test
// warning
dotnet test --runtime win-x86
// no warning
dotnet test --arch x86 --os win

Further technical details

.NET SDK (reflecting any global.json):
 Version:   6.0.400
 Commit:    7771abd614

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.20348
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\6.0.400\

global.json file:
  Not found

Host:
  Version:      6.0.8
  Architecture: x64
  Commit:       55fb7ef977

.NET SDKs installed:
  6.0.400 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.8 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.8 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.8 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info

MichalPetryka avatar Aug 13 '22 12:08 MichalPetryka