-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Description
I am new in .NET runtime repo. I try run library tests in VS, but in case of some libraries (for example, System.IO.Ports, Microsoft.Extensions.Logging) some tests fails with PlatformNotSupportedException because test executable run with component implemented by .notsupported.cs platform variant (in case of Logging) and .Unix.cs variant in case of Ports. It happens only with net11 targets and do not happen with net481. It also do not happen when running dotnet build /t:Test in command line.
Did I anything wrong?
Reproduction Steps
- Clone fresh runtime repo
.\build.cmd -rc Release.\Build.cmd -vs Microsoft.Extensions.Logging- Test Explorer > Run All Tests in View
Expected behavior
Exclude tests for unsupported platform
Actual behavior
They are included multiple times. For one platform they pass, other fails.
Regression?
No response
Known Workarounds
Run from commad line
Configuration
dotnet/runtime, branch main, commit 216076f
Windows 11 x64 DevBox
VS version: 18.4.0 Insiders [11407.181.main]
Other information
No response