-
Notifications
You must be signed in to change notification settings - Fork 262
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
MSTest.Sdk 3.7.0 issues when targeting .NET Framework 4.8 #4426
Comments
@Youssef1313, what about DLL? Why is it not being built? And why do .NET 8 and .NET 4.8 behaviors are different? |
@avivanoff this is the normal behavior of runtime when building an exe for net framework VS netcore/net. |
I can confirm this, but with The build does not show any issues. Running the tests via test explorer shows only not run. The test output exposes some issues. The pipeline on the other hand does not show any issues. ( Edit says: Edit says again: Turning |
Using project file like Using project file like Using project file like |
@factorysoft-01 Nope, that does not work either. I changed the project file: I then ran the tests in the test explorer, with the same result: The test output gave me the same errors as before:
If I run the tests via the cli, the error does not occur: Edit says: When running along with |
I change the sample from @avivanoff to MSNetSDK and Package Reference v3.7.0. The test never run with VS Explorer 2022 v17.12.3. The original sample work for me. Hope this helps. |
@Youssef1313, selecting this mode does seem to fix the problem. But it looks like this feature being in preview still has ways to go - test discovery does not always work; the test project executable is being kept loaded which prevents builds from succeeding - just to name a few. |
When using MSTest.Sdk 3.7.0 in the test project targeting .NET Framework 4.8 I found the following issues:
An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests. Exception: Could not load file or assembly 'Microsoft.Testing.Platform, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
When projects target .NET 8 the aforementioned issues are not present. See the sample project.
The text was updated successfully, but these errors were encountered: