You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xharness version
XHarness command issued: version
xharness version 6.0.0-prerelease.24224.2+d1dd9c2ce3fc0b9358d2cda64c52d052d1a612c1 (Microsoft.DotNet.XHarness.CLI.exe)
The text was updated successfully, but these errors were encountered:
amirvenus
changed the title
globa.json
global.json causes xharness to be confused about the version
May 1, 2024
I think this means that it didn't find any .NET - not just the right version. CI typically doesn't have .NET installed globally on the machine, it runs with a private (unzip) install in some "random" location. The xharness is run via the executable so it will need to have that location specified in DOTNET_ROOT env. variable otherwise it won't work.
@ivanpovazan how is the xharness executed? Is it done by hand by users, or we ship some kind of msbuild task which does that? If it's the latter, then we should implement the same behavior as other parts of SDK: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_host_path. This is the solution other pieces of the SDK use to correctly find .NET runtime even without DOTNET_ROOT - the idea being that running dotnet build already effectively specified the runtime location (that's where dotnet comes from), so everything spawned during the build should use that location. For complex reasons the CLI will not set DOTNET_ROOT, instead it sets DOTNET_HOST_PATH and other parts of the SDK recognize it and use it to locate the .NET.
Hi,
I have the following global.json in my solution folder:
However, when the pipeline runs, I get this error:
You must install .NET to run this application.
App: /Users/build/.dotnet/tools/xharness
Architecture: arm64
App host version: 6.0.29
.NET location: Not found
Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed
Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=arm64&rid=osx.13-arm64&apphost_version=6.0.29
I can run the xharness through the macOS terminal without any problems.
The text was updated successfully, but these errors were encountered: