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

Stop setting DOTNET_ROOT in dotnet test #3586

Closed
rseanhall opened this issue Apr 19, 2022 · 3 comments · Fixed by #3715
Closed

Stop setting DOTNET_ROOT in dotnet test #3586

rseanhall opened this issue Apr 19, 2022 · 3 comments · Fixed by #3715

Comments

@rseanhall
Copy link

Description

dotnet test is always setting the DOTNET_ROOT environment variable in the testhost.exe process. Before .NET 6, this was ignored in x86 processes with standard fxr resolver logic. Starting in .NET 6, the standard fxr resolver logic will use this location even if it is the wrong architecture.

Steps to reproduce

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0-windows</TargetFramework>
    <PlatformTarget>x64</PlatformTarget>
    <RollForward>Major</RollForward>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" />
    <PackageReference Include="xunit" />
    <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
  </ItemGroup>
</Project>

Expected behavior

DOTNET_ROOT is not set in the testhost.exe process. DOTNET_ROOT_x64 may or may not be set.

Actual behavior

DOTNET_ROOT is set.

Further information can be found in dotnet/runtime#68180.

@vitek-karas
Copy link
Member

FYI @MarcoRossignoli

@Evangelink
Copy link
Member

This is paused at the moment as there is no good way for us to fix this at the moment.

@nohwnd
Copy link
Member

nohwnd commented Jul 9, 2024

This is a new feature and won't be implemented, we are focusing on adding new features to Testing.Platform instead. https://aka.ms/testingplatform

@nohwnd nohwnd closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
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 a pull request may close this issue.

5 participants