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

Should MSTest.TestAdapter declare MSTest.TestFramework as a dependency? #4727

Open
Youssef1313 opened this issue Jan 19, 2025 · 4 comments
Open

Comments

@Youssef1313
Copy link
Member

Youssef1313 commented Jan 19, 2025

The nuspec of MSTest.TestAdapter doesn't define MSTest.TestFramework as a dependency, but I don't see any reason why it shouldn't. @Evangelink Do you know if there was a reason in past?

@Evangelink
Copy link
Member

I have no idea why the current setup was done as it is. I can't think of a problem doing it right now but let's have it sit for a few days.

@nohwnd
Copy link
Member

nohwnd commented Jan 20, 2025

probably because testadapter already ships the test framework dll so it was not strictly necessary?

@Youssef1313
Copy link
Member Author

@nohwnd It's only shipped in build (not lib) and only for .NET Framework and mainly used for the custom assembly resolver:

<!--
For .NET Framework, when using AppDomains (default) with VSTest, VSTest uses a custom assembly resolver that only
considers VS folders and MSTest.TestAdapter NuGet folder to look for deps, resulting in TestFramework.dll not
being found.
There is no way to fix this issue, but we can work around it by copying the TestFramework.dll to the NuGet
folder, as it was done before 3.7 cleanup. The original issue mentions MTP which is fixed by not taking explicit
deps to it in the "engine" project and keep them only under the TestingPlatformAdapter folder.
See https://github.com/microsoft/testfx/issues/4426
-->
<file src="net462\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net462\" />

@nohwnd
Copy link
Member

nohwnd commented Jan 20, 2025

okay even though that is a pretty recent change (shipping only for .net framework, before 3.7 it was shipped for all iirc). So not it. :)

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

No branches or pull requests

3 participants