MSTest.TestAdapter does not get nuget-restored if the target framework is .NETStandard2.0
See original GitHub issueDescription
MSTest.TestAdapter does not get nuget-restored if the target framework is .NETStandard2.0
Steps to reproduce
- Install Visual Studio 15.5.0 Preview 2
- Create a new project using
File | New Project | Visual C# | .NET Standard | Class Library (.NET Standard)
- Add a NuGet Reference to the project to
MSTest.TestFramework (v1.2.0)
- Add a NuGet Reference to the project to
MSTest.TestAdapter (v1.2.0)
- Build the project
Expected behavior
No warning. The MSTest packages should get NuGet-restored as expected.
Actual behavior
warning NU1701: Package ‘MSTest.TestAdapter 1.2.0’ was restored using ‘.NETFramework,Version=v4.6.1’ instead of the project target framework ‘.NETStandard,Version=v2.0’. This package may not be fully compatible with your project.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:32 (16 by maintainers)
Top Results From Across the Web
Using MSTest Framework for testing applications targeting ...
NET Core 1.0 and referencing my system-under-test assemblies that target .NET Standard 1.6 - and it works just fine. The question is -...
Read more >Test explorer doesn't display/run tests for multiple target ...
I have created a simple class library that targets NETSTANDARD2.0 and NET461. ... Test run for C:\Users\xxx\Documents\Visual Studio ...
Read more >Update to MSTestV2 - Visual Studio (Windows)
Learn to create unit test projects to target specific versions of the .NET Framework. The targeted version must be 3.5 or later, and...
Read more >Troubleshoot .NET Framework targeting errors
This article provides resolutions for MSBuild errors that might occur because of reference issues.
Read more >MSTest.TestAdapter 3.1.1
This package includes the adapter logic to discover and run tests. For access to the testing framework, install the MSTest.TestFramework package....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I have a library that I want to make sure runs on any NET Standard, why shouldn’t it be possible? Isn’t the point of having a reference in VisualStudio stating “NETStandardLibrary 2.0” means all applicable references of that library set? And if so, how testing on NET Core 2.2 proves that the library can run on any NET Standard? There is quite a chance that it may end up requiring NET Framework 4.7.2 with this kind flaky testing.
Any updated on this, please? I drags on, and on, and on.