Context
To run XHarness through Helix SDK, we need ASP.NET runtime. However, in .NET 6 RC 1 the versions of the bundled NETCore.App runtime are somehow lower and the NETCore.App that is bundled with ASP.NET runtime cannot run XHarness CLI.
The version and type of .NET is set here:
https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/XHarnessRunner.targets#L6
For this reason, we switched to using the full SDK in the XHarness workloads which is probably unnecessary in the future.
Problem details
.NET says it cannot find a runtime but the runtime seems to be present:
> dotnet --info
Host (useful for support):
Version: 6.0.0-rc.1.21376.24
Commit: 2053d653bf
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-rc.1.21378.2 [/private/tmp/helix/working/AD8F0968/p/dotnet-cli/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21376.24 [/private/tmp/helix/working/AD8F0968/p/dotnet-cli/shared/Microsoft.NETCore.App]
> dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.0-rc.1.21378.2 [/private/tmp/helix/working/AD8F0968/p/dotnet-cli/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21376.24 [/private/tmp/helix/working/AD8F0968/p/dotnet-cli/shared/Microsoft.NETCore.App]
dotnet exec /tmp/helix/working/AD8F0968/p/microsoft.dotnet.xharness.cli/1.0.0-dev/tools/net6.0/any/Microsoft.DotNet.XHarness.CLI.dll apple device ios-simulator-64
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '6.0.0-rc.1.21378.2' was not found.
- The following frameworks were found:
6.0.0-rc.1.21376.24 at [/private/tmp/helix/working/AD8F0968/p/dotnet-cli/shared/Microsoft.NETCore.App]
1) Installing aspnetcore runtime only
```
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '6.0.0-rc.1.21378.2' was not found.
- The following frameworks were found:
6.0.0-rc.1.21376.24 at [/mnt/d/github/xharness/artifacts/tmp/.dotnet/shared/Microsoft.NETCore.App]
```
```
> ./.dotnet/dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.0-rc.1.21378.2 [/mnt/d/github/xharness/artifacts/tmp/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21376.24 [/mnt/d/github/xharness/artifacts/tmp/.dotnet/shared/Microsoft.NETCore.App]
```
2) Installing dotnet runtime only
```
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '6.0.0-rc.1.21378.2' was not found.
- No frameworks were found.
```
```
> ./.dotnet/dotnet --list-runtimes
Microsoft.NETCore.App 6.0.0-rc.1.21378.2 [/mnt/d/github/xharness/artifacts/tmp/.dotnet/shared/Microsoft.NETCore.App]
```
3) Installing both dotnet+aspnetcore runtimes
Finally worked
Goal
As a workaround, we switched to using the full SDK in the XHarness workloads. Once we are past RC1 - maybe RC2, maybe full .NET 6 - start using the aspnetcore runtime only to run XHarness (basically revert the last change).
Context
To run XHarness through Helix SDK, we need ASP.NET runtime. However, in .NET 6 RC 1 the versions of the bundled NETCore.App runtime are somehow lower and the NETCore.App that is bundled with ASP.NET runtime cannot run XHarness CLI.
The version and type of .NET is set here:
https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/XHarnessRunner.targets#L6
For this reason, we switched to using the full SDK in the XHarness workloads which is probably unnecessary in the future.
Problem details
.NET says it cannot find a runtime but the runtime seems to be present:
1) Installing aspnetcore runtime only
2) Installing dotnet runtime only
3) Installing both dotnet+aspnetcore runtimes
Finally worked
Goal
As a workaround, we switched to using the full SDK in the XHarness workloads. Once we are past RC1 - maybe RC2, maybe full .NET 6 - start using the
aspnetcore runtimeonly to run XHarness (basically revert the last change).