Repository navigation
Modernize stale docs (TFMs, code coverage, env vars, MTP context) #16279
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
Merged
Azat Mukhametshin (azat-msft)
merged 11 commits into
microsoft:main
from
azat-msft:docs-tier2-rest
Jul 15, 2026
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d7ce3f5
Docs (tier 2): modernize stale guides (excluding TODO placeholder res…
azat-msft d4771b4
Potential fix for pull request finding
azat-msft fa59b1b
Apply suggestions from code review
azat-msft 05ca3eb
Address nohwnd review comments on environment-variables.md
azat-msft c89232c
Refine FORCENETDUMP Values row and WINAPPHOST description from research
azat-msft 67bb80b
Clarify VSTEST_WINAPPHOST_ is SDK apphost DOTNET_ROOT forwarding, not…
azat-msft 5d28913
Fix grammar in test execution process name known issue
azat-msft 6d7ae82
Apply suggestions from code review
azat-msft be338da
Address automated review comments (nullable snippets, grammar, doc ac…
azat-msft 0da4d21
Remove duplicated VSTEST_CONSOLE_PATH header
azat-msft b9309ed
Address further review comments (WINAPPHOST source-grounding, vstest …
azat-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,18 @@ | ||
| For dotnet core test projects, the test platform is acquired as a nuget package (Microsoft.NET.Test.Sdk) and the runtime (testhost.dll similar to testhost.exe) is also part of the nuget package. | ||
| For SDK-style .NET test projects, the supported path is to reference | ||
| `Microsoft.NET.Test.Sdk` and run tests with `dotnet test`. | ||
|
|
||
| When dotnet build runs, the above mentioned packages are restored to the users' global nuget cache in the absence of any overridden config. When vstest.console.exe runs <UnitTestProject>.runtimeconfig.dev.json is looked into to determine the folders to look for the testhost.dll (something like the below) in addition to the folder where the test dll is present (https://github.com/Microsoft/vstest/blob/c7472a479966a218fb0ac508ed799418eb4bfc00/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs#L374) | ||
| `dotnet test` builds the test project, restores NuGet packages, and runs the test | ||
| assembly with the test platform components provided by `Microsoft.NET.Test.Sdk`. | ||
| The VSTest testhost provider still uses the test assembly's `.deps.json` and, when | ||
| present, `.runtimeconfig.dev.json` to locate `testhost.dll`; if it cannot resolve | ||
| the package-provided testhost for a managed test assembly, it fails with guidance | ||
| to add `Microsoft.NET.Test.Sdk`. | ||
|
|
||
| { | ||
| "runtimeOptions": { | ||
| "additionalProbingPaths": [ | ||
| "C:\\Users\\shivash\\.dotnet\\store\\|arch|\\|tfm|", | ||
| "C:\\Users\\shivash\\.nuget\\packages", | ||
| "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" | ||
| ] | ||
| } | ||
| } | ||
| In normal SDK-style projects there is no separate VSTest-specific probing-path setup | ||
| to document or configure. If you need to run tests from a copied directory or on a | ||
| machine that does not have the restored NuGet packages, publish the test project and | ||
| run from the publish output so the test assembly and its runtime dependencies are | ||
| available together. | ||
|
|
||
| In the case of the customer, the nuget packages aren't being restored to the paths defined in the <UnitTestProject>.runtimeconfig.dev.json resulting in the testhost.dll not being determined. The locations used for the nuget packages can be determined using the below : https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders#viewing-folder-locations | ||
|
|
||
| To mitigate the issue and as a general recommendation for running dot net core tests with vstest task please ask the customer to publish the test project and point to the publish location for running tests. Publish ensures all needed dependencies are present for the tests to be executed alongside the test dll in case of dot net core tests. | ||
| Current `dotnet test` usage is documented in the .NET testing guide: | ||
| <https://learn.microsoft.com/dotnet/core/testing/>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.