testfx: Cannot run tests anymore after upgrading to 2.2.1
Attempt to upgrade our test projects to version from 2.1.2 to 2.2.1 results in the following test execution error:
An exception occurred while invoking executor 'executor://mstestadapter/v2': Could not load file or assembly 'Microsoft.TestPlatform.AdapterUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 38 (16 by maintainers)
Commits related to this issue
- Missing assembly added to TestAdapter package (#796) Fixes #789 — committed to microsoft/testfx by Haplois 3 years ago
- Fixed #789 — committed to Haplois/testfx by Haplois 3 years ago
- Added missing library to the NuGet package. (#798) Fixes #789 — committed to microsoft/testfx by Haplois 3 years ago
@Haplois here are my results:
The target framework of the solution is .NET Core 3.1.
Starting with MSTest.TestAdapter v2.1.2
Hello, after updating the MSTest.TestAdapter from v2.1.2 to v2.2.1, I can’t run “all” tests either.
We have several test projects in the solution. I can run only some of them. For the others I got this errors in the test output:
Sorry for the german error message, that should be something like: Incorrect format for TestCaseFilter Error: Missing …
Ciao, Mike
That error prevented test discovery, So all the tests discovered on previous runs or via source-based discovery would show not run status. You can configure Test Platform to report failure when no tests are discovered, but that’s not the default behavior. See the documentation—example below.
Let’s do this again 😃 a fixed version is just released. Please use
v2.2.3
.@Haplois, thanks a lot. After updating to this preview version, I can run again my unit test!
This bug is fixed in version
2.2.2-preview-20210310-03
. The preview package is available in our daily feeds.@Haplois I’ve updated my earlier reply with more details and a more reliable repro of the other error.
Unfortunately the workaround you suggest won’t work for me because I depend on AppDomains in the .NET Framework tests. I’ll just stick with
2.1.1
for now:We should have a preview in a week or two max, and if everything goes well, we can do another minor release.