-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression - After an update to 2.2.3 no tests are discovered anymore due to netstandard2.0-dependency #820
Comments
By the way according to nuget this package should not depend on netstandard 2.0
Source: https://www.nuget.org/packages/MSTest.TestAdapter/2.2.3 |
Would you be able to give a simple full repro please? You can zip a project and drop it here. |
Hi @nohwnd Any test will work, what is important here is the environment. You can use any test project, but you need to run it within an environment where the highest possible .NET-Version is below .NET 4.7. F.E. Take a virtual machine; install Windows Server 2012 R2 and Microsoft TFS 2017 (f. e. Version 15.117.27024.0). Then try to run the tests on that machine and the error will occur. It should also be possible to reproduce this without installing TFS - simply sticking to .NET below 4.7 should do the job. The hard thing is that virtually everywhere a newer version than 4.7 is installed (f. e. because it is a Visual Studio requirement) I understand that this is a very specific problem – most people will in fact have installed a recent .NET-version. Therefore I can also understand if this is not going to be investigated further. For our part we simply stick with 2.1.2 in affected projects. |
Description
After updating MSTest from version 2.1.2 to 2.2.3 no tests are discovered anymore on the build server (TFS 2017).
The following error is shown:
The projects target .NET 4.6.2, which is also the only runtime, which is installed on the server.
Note: On a local machine, which has VS 2019 and therefore .NET 5 installed, all tests are discovered and run as expected.
The packages.config of an affected test project looks like so:
Expected behavior
Tests should still be discovered upgrading MSTest.
I assume that the error is related to the fact that it is assumed that .NETStandard.Library is either already installed or referenced in an according version (it seems like the netstandard2.0-dependency was introduced by #796). Anyways, if a reference to NETStandard.Library is required by MSTest (+ the Adapter) the PackageReference should be a part of MSTest - changing a local solution (in my case over 30 projects) just to make MSTest work is a bit nasty.
The text was updated successfully, but these errors were encountered: