Test discover failed on net6.0 with v3: Field not found: 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.TestRunDirectoryLabel'.
See original GitHub issueDescribe the bug
I was hit by the bug #1035 so i upgraded to v3 and now i get a different error.
[MSTest][Discovery][~\epplus\EPPlusTest\bin\Debug\net6.0\EPPlusTest.dll] Failed to discover tests from assembly ~\epplus\EPPlusTest\bin\Debug\net6.0\EPPlusTest.dll. Reason:Field not found: 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.TestRunDirectoryLabel'.
No test is available in ~\epplus\EPPlusTest\bin\Debug\net6.0\EPPlusTest.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again
Steps To Reproduce
- Clone https://github.com/visualon/epplus
- Run dotnet test -f net6.0
- See error
Expected behavior
It should discover net6.0
tests
Actual behavior
It doesn’t discover any tests.
Additional context
Similar issues:
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
c# - Strange error when trying to discover MSTest tests in ...
Reason:Field not found: 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.TestRunDirectoryLabel'. No test is available in ...
Read more >Update to MSTestV2 - Visual Studio (Windows)
In this article ... You can upgrade your test project by retargeting the MSTest version referenced in your .csproj from the MSTestV1 to...
Read more >Python Tools for Visual Studio Mac - Developer Community
The Python extension for Visual Studio Code is an excellent alternative for Python developers on Mac. https://marketplace.visualstudio.com/items?itemName=ms- ...
Read more >MSTest Unit Testing does not work (or fails with error) ...
I have been running my tests from resharper for some time now and it has been working just fine. But, recently I had...
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
yes, was probably some hickup from assembly upgrades and branch switching.
OK. closing vs, shutdown all build-server and doing a
git clean -ffdx
fixed the issue. Sorry for the noise