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

Unhelpful/misleading error message #4194

Closed
matkoch opened this issue Dec 13, 2022 · 10 comments
Closed

Unhelpful/misleading error message #4194

matkoch opened this issue Dec 13, 2022 · 10 comments

Comments

@matkoch
Copy link

matkoch commented Dec 13, 2022

  • After install of .NET 7
  • Projects with net5.0
  • Macbook M1
Could not find 'dotnet' host for the 'X64' architecture.

You can resolve the problem by installing the 'X64' .NET.

The specified framework can be found at:
  - https://aka.ms/dotnet-download
@MarcoRossignoli MarcoRossignoli added the needs-triage This item should be discussed in the next triage meeting. label Dec 13, 2022
@MarcoRossignoli
Copy link
Contributor

MarcoRossignoli commented Dec 13, 2022

The net5.0 is officially supported on macOS only for x64 version https://dotnet.microsoft.com/en-us/download/dotnet/5.0 so by design the test platform tries to fallback to the x64 runtime. You should install the x64 version to run it.
The official support for arm64 started since 6.0 https://dotnet.microsoft.com/en-us/download/dotnet/6.0

cc: @vitek-karas

@MarcoRossignoli MarcoRossignoli added by-design and removed needs-triage This item should be discussed in the next triage meeting. labels Dec 13, 2022
@DamianSuess
Copy link

On my windows machine, I do have the .NET 6 x64 installed and I'm getting the same error message. Or, am I missing something?

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.406/

Host:
  Version:      6.0.14
  Architecture: x64
  Commit:       2a90daa2cc

.NET SDKs installed:
  3.1.421 [/usr/share/dotnet/sdk]
  5.0.408 [/usr/share/dotnet/sdk]
  6.0.406 [/usr/share/dotnet/sdk]

@MarcoRossignoli
Copy link
Contributor

On my windows machine

The dotnet --info you've posted looks like is from Linux.

@DamianSuess
Copy link

DamianSuess commented Mar 1, 2023

Correct, ran from Windows using WSL2
Let me know if you need any more info; happy to help.

@vitek-karas
Copy link
Member

@DamianSuess could you please specify in more detail what you're trying to run (and where) and when do you get the failure?
And also - how did you install the .NET SDK?

@DamianSuess
Copy link

DamianSuess commented Mar 1, 2023

This occurs when attempting to run unit tests on VS2022 v17.5.0 Enterprise using the testEnvironments.json feature wired to my WSL2 Ubuntu-20.04 distribution.

The testEnvironment.json contains:

{
  "version": "1",
  "environments": [
    {
      "name": "WSL Ubuntu",
      "type": "wsl",
      "wslDistribution": "Ubuntu-20.04"
    }
  ]
}

Output from "Tests" after attempting to run any unit test (masked the namespace of course):

Building Test Projects
Executing test method: MyNameSpace.TestNameHere
========== Starting test run ==========
Could not find 'dotnet' host for the 'X64' architecture.

You can resolve the problem by installing the 'X64' .NET.

The specified framework can be found at:
  - https://aka.ms/dotnet-download

Could not find 'dotnet' host for the 'X64' architecture.

You can resolve the problem by installing the 'X64' .NET.

The specified framework can be found at:
  - https://aka.ms/dotnet-download

========== Test run aborted: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========

@vitek-karas
Copy link
Member

@MarcoRossignoli this is something you will have to look at, I have no idea how the testhost resolution works with the WSL target.

@MarcoRossignoli
Copy link
Contributor

Correct, ran from Windows using WSL2
Let me know if you need any more info; happy to help.

Oh sorry I've misunderstood, now it's clear.

@AbhitejJohn do you have some info on it?

@AbhitejJohn
Copy link
Contributor

@DamianSuess : Could you also set logging level under Test->Options to "Diagnostics" and share the contents of Output->Tests with us please? Please feel free to log a developer community feedback ticket so uploading some of this information is easier in terms of privacy.

@DamianSuess
Copy link

DamianSuess commented Mar 2, 2023

@AbhitejJohn, I wish I had seen this request before shutting down yesterday because this morning it's "magically" working again. As a fellow dev, it bugs me to provide that kind of response & I'm trying to shake the tree w/ WSL and VSTest to reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants