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

Use aspnetcore runtime only instead of full SDK to run XHarness #7787

Closed
premun opened this issue Aug 25, 2021 · 5 comments · Fixed by #8217
Closed

Use aspnetcore runtime only instead of full SDK to run XHarness #7787

premun opened this issue Aug 25, 2021 · 5 comments · Fixed by #8217
Assignees

Comments

@premun
Copy link
Member

premun commented Aug 25, 2021

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).

@premun premun self-assigned this Aug 25, 2021
@ghost ghost added the Needs Triage A new issue that needs to be associated with an epic. label Aug 25, 2021
premun added a commit to premun/arcade that referenced this issue Aug 25, 2021
@premun premun removed the Needs Triage A new issue that needs to be associated with an epic. label Aug 25, 2021
@riarenas
Copy link
Member

I think this is another side effect of using an unreleased version of the sdk. I'm not sure there's a good way to see which runtimes are supposed to go with nightly unreleased versions. Once RC1 actually releases we need to move all repos to use the released version instead of the one we took to unblock nuget restores.

@premun
Copy link
Member Author

premun commented Aug 25, 2021

Cool, so let's do it then. Should I put this todo next to the AspNetCoreRuntimeVersion that needs to be bumped together with the SDK so that people who do the bump notice?

@riarenas
Copy link
Member

riarenas commented Aug 25, 2021

Is there a reason why it's not desirable to just always install the SDK? It seems like it's actually a goal for us to be able to use daily sdks in repos.

@premun
Copy link
Member Author

premun commented Aug 25, 2021

I just assumed we save bandwidth since we need the runtime only. But if it doesn't matter much, I don't care which one we use.

riarenas pushed a commit that referenced this issue Aug 25, 2021
* Use full .NET SDK to run XHarness (temporarily)

#7787

* Add TODOs, lock the RC1 version better
@premun
Copy link
Member Author

premun commented Nov 1, 2021

This is waiting for Arcade to switch onto .NET 7 preview 1

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.

2 participants