question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test discover failed on net6.0 with v3: Field not found: 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.TestRunDirectoryLabel'.

See original GitHub issue

Describe 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

  1. Clone https://github.com/visualon/epplus
  2. Run dotnet test -f net6.0
  3. 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:closed
  • Created 9 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
viceicecommented, Dec 19, 2022

yes, was probably some hickup from assembly upgrades and branch switching.

1reaction
viceicecommented, Dec 19, 2022

OK. closing vs, shutdown all build-server and doing a git clean -ffdx fixed the issue. Sorry for the noise

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found