Skip to content

Handle dotnet_root in testhost version aware way#15184

Merged
nohwnd merged 9 commits into
microsoft:mainfrom
nohwnd:fix-dotnet_root
Jul 7, 2025
Merged

Handle dotnet_root in testhost version aware way#15184
nohwnd merged 9 commits into
microsoft:mainfrom
nohwnd:fix-dotnet_root

Conversation

@nohwnd

@nohwnd nohwnd commented Jul 3, 2025

Copy link
Copy Markdown
Member

Description

Use VSTEST_DOTNET_ROOT_PATH and VSTEST_DOTNET_ROOT_ARCHITECTURE that will receive the location of dotnet.exe from the dotnet SDK.

When we find testhost.exe we will set env variables based on the version of testhost, to make sure that old testhost gets dotnet_root and new one gets dotnet_root_ so they can pick up local installation of dotnet.

Related dotnet/sdk#49436

@nohwnd

nohwnd commented Jul 3, 2025

Copy link
Copy Markdown
Member Author

This was attempted before but the testnost apphost was too old to undestand the architecture specific dotnet_root: https://github.com/microsoft/vstest/pull/3715/files

@nohwnd

nohwnd commented Jul 4, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs Outdated
@nohwnd

nohwnd commented Jul 7, 2025

Copy link
Copy Markdown
Member Author

#15186

@nohwnd nohwnd merged commit 4b85f30 into microsoft:main Jul 7, 2025
3 of 5 checks passed
nohwnd added a commit to nohwnd/vstest that referenced this pull request Aug 11, 2025
* Handle dotnet_root in testhost version aware way

* Fix unit tests

* Fixes

* Fixes

* Fixes

* Apply suggestion from @nohwnd

* Apply suggestion from @nohwnd

* Revert changes to playground
nohwnd added a commit that referenced this pull request Aug 11, 2025
* Handle dotnet_root in testhost version aware way (#15184)

* Handle dotnet_root in testhost version aware way

* Fix unit tests

* Fixes

* Fixes

* Fixes

* Apply suggestion from @nohwnd

* Apply suggestion from @nohwnd

* Revert changes to playground

* Only apply architecture when it is the same (#15250)
This was referenced Jun 11, 2026
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

Successfully merging this pull request may close these issues.

3 participants