Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load type 'System.Threading.Lock' from assembly 'Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' #4778

Closed
Evangelink opened this issue Jan 24, 2025 · 3 comments
Assignees

Comments

@Evangelink
Copy link
Member

Describe the bug

Tests are crashing when targeting net9.0 WinUI for all MSTest 3.7. Tests are running well for 3.6.4 and lower

Investigation

In 3.7.0, we added support for net9.0 but the target is loading the winui platform services from net6.0 which is causing a mismatch in signature for the location of Lock.

@ghord
Copy link

ghord commented Jan 25, 2025

Can confirm that downgrading MsTest.TestAdapter to version 3.6.4 fixed the issue for me. I was not able to run any winui3 tests on .net9 on versions 3.7+. Thanks for the workaround hint.

@Evangelink
Copy link
Member Author

We will ship the fix next week

@Evangelink
Copy link
Member Author

Fixed by #4793. I'll add some acceptance test to reduce chances of regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants