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
Our project targets both .NET 8 and .NET Framework 4.7.2. We use Visual Studio (current version 17.12.1) as our IDE. When using release 3.6.4 of MSTest.TestFramework and MSTest.TestAdapter, the tests for both targets are detected and run from within Visual Studio. When we upgrade to release 3.7.0 of MSTest.TestFramework and MSTest.TestAdapter, the .NET Framework 4.7.2 targeted tests appear in the Visual Studio test explorer, but the tests are ignored if the tests are launched inside Visual Studio. All tests run as expected if tests are run from the command line. Here's a table describing the behavior, in case that's clearer:
After the tests run, the status bar will report "Test run finished: 2 Tests (2 Passed, 0 Failed, 0 Skipped)'
Exit visual studio
Execute dotnet test from the command prompt
Tests will run, with a summary saying "Test Summary: total: 2, failed: 0, succeeded: 2, skipped: 0"
Using release 3.7.0 of MSTest.Test*
Expand the Zip file to a clean local folder
Open Directory.Packages.props in a text editor
Bump MSTest.TestAdapter (line 13) and MSTest.TestFramework (line 14) from version 3.6.4 to version 3.7.0
Save the file
Open Sample.sln in visual studio
From the menu, Tests > Run All Tests
After the tests run, the status bar will report "Test run finished: 1 Tests (1 Passed, 0 Failed, 0 Skipped). This difference from 3.6.4 is the bug being reported
Exit visual studio
Execute dotnet test from the command prompt
Tests will run, with a summary saying "Test Summary: total: 2, failed: 0, succeeded: 2, skipped: 0"
Expected behavior
Tests targeting both net472 and net80 should be detected and run from within Visual Studio
Actual behavior
Tests targeting net80 get detected and run from within Visual Studio, while the tests targeting net472 are ignored from within Visual Studio
Additional context
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report and for extracting a small repro. This is a duplicate of #4426 so I'm going to close as a duplicate. As we are in a holiday season, we may not be able to look before the next week. Sorry for the inconvenience.
FYI @Evangelink, this repro here doesn't seem to be using MTP, which is curious.
Describe the bug
Our project targets both .NET 8 and .NET Framework 4.7.2. We use Visual Studio (current version 17.12.1) as our IDE. When using release 3.6.4 of MSTest.TestFramework and MSTest.TestAdapter, the tests for both targets are detected and run from within Visual Studio. When we upgrade to release 3.7.0 of MSTest.TestFramework and MSTest.TestAdapter, the .NET Framework 4.7.2 targeted tests appear in the Visual Studio test explorer, but the tests are ignored if the tests are launched inside Visual Studio. All tests run as expected if tests are run from the command line. Here's a table describing the behavior, in case that's clearer:
dotnet test
Steps To Reproduce
This is happening in the https://github.com/microsoft/sbom-tool project, but I'm including a stripped down demo as Sample.zip to simplify the repro.
Using release 3.6.4 of MSTest.Test*
Sample.sln
in visual studiodotnet test
from the command promptUsing release 3.7.0 of MSTest.Test*
Directory.Packages.props
in a text editorMSTest.TestAdapter
(line 13) andMSTest.TestFramework
(line 14) from version 3.6.4 to version 3.7.0Sample.sln
in visual studiodotnet test
from the command promptExpected behavior
Tests targeting both
net472
andnet80
should be detected and run from within Visual StudioActual behavior
Tests targeting
net80
get detected and run from within Visual Studio, while the tests targetingnet472
are ignored from within Visual StudioAdditional context
The text was updated successfully, but these errors were encountered: