WindowsAppSDK: MSTest Discovery Broken with 1.1.x
Describe the bug
After updating to 1.1.1/1.1.2 from 1.0.3 MSTest discovery is now broken. This is a blocking issue for us.
We couldn’t test in our CI before because we were blocked by #2631 as well. I tried in the CI, but it seems there may have been something missed with the fix for #2631 as it’s trying to install 1.1.1 still for MSTest, see comment here on that issue.
Locally I see the same behavior still I did with 1.1.1:
========== Starting test discovery ==========
[MSTest][Discovery][H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll] Failed to discover tests from assembly H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll. Reason:File does not exist: H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll
No test is available in H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 0 Tests found in 5.1 sec ==========
The file exists on disk, everything built. Only change is updating NuGet reference from 1.0.3 to 1.1.x causes tests now to not be discovered properly/run.
Steps to reproduce the bug
- Create a MSTest based unit test project for WinAppSDK with 1.0.3
- Run tests.
- Close VS
- Clean environment
- Update to 1.1.x
- Re-run tests (fail)
Note, you have to close VS/clean environment as VS caches test discovery, didn’t detect this issue at first on initial update as VS used prior cache to run tests. Issue seems to be with test discovery itself.
Expected behavior
Able to run MSTest projects as was able to with 1.0.3.
Screenshots
No response
NuGet package version
1.1.1
Packaging type
No response
Windows version
Windows 10 version 21H2 (19044, November 2021 Update)
IDE
Visual Studio 2022
Additional context
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 17 (6 by maintainers)
Commits related to this issue
- Update MSTest to 2.2.10 See https://github.com/microsoft/WindowsAppSDK/issues/2706 Seems like discovery works, but now `Window.Current` fails to activate. — committed to CommunityToolkit/Labs-Windows by michael-hawker 2 years ago
- Update MSTest to 2.2.10 See https://github.com/microsoft/WindowsAppSDK/issues/2706 Seems like discovery works, but now `Window.Current` fails to activate. — committed to CommunityToolkit/Labs-Windows by michael-hawker 2 years ago
- Update MSTest to 2.2.10 See https://github.com/microsoft/WindowsAppSDK/issues/2706 Seems like discovery works, but now `Window.Current` fails to activate. — committed to CommunityToolkit/Labs-Windows by michael-hawker 2 years ago
Can reproduce. Here’s log output from my test project w/ verbosity cranked up. Not very helpful.