-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Testhost.exe does not find '7.0.0-preview.6.22324.4' runtime when running tests #26462
Comments
@pavelhorak @nohwnd to take a look. This is a local install of the SDK running tests and now finding that local install. I'm not sure why this would be expected to work without setting DOTNET_ROOT |
The expected dotnet.exe is the first thing on the PATH. |
CC @elinor-fung @vitek-karas with the old MLL behavior, I'd expect it to still search the global location but MLL should be disabled now. Is testhost still using it? |
I don't think this is related to multi-level lookup. If I recall correctly, I believe the expectation is that when the test runner ( It looks like that is not happening now. I suspect this may be from microsoft/vstest#3715 That change sets |
@MarcoRossignoli can you look at this? |
We found the issue and we're working on the fix. |
@iSazonov that is because 7.0 disabled multi-level lookup. So if you run |
Describe the bug
When running xunit tests using
dotnet test
the building of the product code and test code completes with the correct SDK version -7.0.0-preview.6.22324.4
./cc @marcpopMSFT @mmitche
But when test execution begins, an error is reported:
I have attached the debug log from the run: diag2.txt
Workaround: Setting DOTNET_ROOT to point to 'C:\Users\adity\AppData\Local\Microsoft\dotnet' fixes the issue.
This has started happening with .NET 7 Preview 6.
To Reproduce
Import-Module build.psm1
Start-PSBootstrap
cd test\xUnit
dotnet test
Exceptions (if any)
esthost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '7.0.0-preview.6.22324.4' (x64) was not found.
3.1.20 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.24 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.26 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.17 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
6.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
6.0.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
. Please check the diagnostic logs for more information.
Test Run Aborted.
Further technical details
dotnet --info
.NET SDK:
Version: 7.0.100-preview.6.22352.1
Commit: 492644e08e
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Users\adity\AppData\Local\Microsoft\dotnet\sdk\7.0.100-preview.6.22352.1\
Host:
Version: 7.0.0-preview.6.22324.4
Architecture: x64
Commit: d3fa592f6d
.NET SDKs installed:
7.0.100-preview.6.22352.1 [C:\Users\adity\AppData\Local\Microsoft\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.0-preview.6.22330.3 [C:\Users\adity\AppData\Local\Microsoft\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.0-preview.6.22324.4 [C:\Users\adity\AppData\Local\Microsoft\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 7.0.0-preview.6.22351.3 [C:\Users\adity\AppData\Local\Microsoft\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
D:\PSGit\PowerShell\global.json
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
The text was updated successfully, but these errors were encountered: