microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
869 stars 316 forks source link

Add option to not share .NET Framework testhosts #5018

Closed nohwnd closed 1 month ago

nohwnd commented 2 months ago

Adds runsettings option to disable sharing testhosts:


<DisableSharedTestHost>true</DisableSharedTestHost>

and ENV:

VSTEST_DISABLE_SHARING_NETFRAMEWORK_TESTHOST=1

This is useful when solution is using both MSTest v2 and MSTest v3 and would like to run each project in isolated process even when they are not running in parallel, or not disabling appdomains. Otherwise the extension logic will send both extension dlls to the host for initialization and it will fail to find the extension and to run the tests.

This option only affects .NET Framework test projects that don't enable parallelization, or don't disable app domains. Such projects are sharing host, others are not.

Adds option to skip default adapters (the extensions that are place in Extensions folder in our VisualStudio folder).

<SkipDefaultAdapters>true</SkipDefaultAdapters>

This allows projects to run even if external extensions (such as Chutzpah) add dependencies that are incompatible with the projects. Without this option all extensions from the built in folder are always included in the run.

Fix https://github.com/microsoft/vstest/issues/3475

nohwnd commented 1 month ago

/azp run

azure-pipelines[bot] commented 1 month ago
Azure Pipelines successfully started running 1 pipeline(s).