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

Include needed runtime version and arch in error message when no runtime is installed #3811

Closed
elinor-fung opened this issue Oct 17, 2019 · 1 comment
Assignees
Milestone

Comments

@elinor-fung
Copy link
Member

When the running a console app where the runtime is not installed, the host fails to find hostfxr and shows something like:

A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [D:\helloWorld\bin\Debug\netcoreapp3.0\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].

This contains a lot of information / potential fixes, but is not that readable or user-friendly.

When running a console app where a framework is missing, the host shows something like:

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
  - The following frameworks were found:
      3.0.0 at [D:\dotnet-test\shared\Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

With dotnet/core-setup#8509, a more user-friendly error message will be shown for GUI applications on Windows. We can look at doing the same for console apps tracing to stderr.

@msftgits msftgits transferred this issue from dotnet/core-setup Jan 30, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 30, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Feb 24, 2020
@agocke agocke modified the milestones: 5.0.0, 6.0.0 Jun 29, 2020
@agocke agocke changed the title Make error message when runtime is not installed or framework is missing more user-friendly Include needed runtime version and arch in error message when no runtime is installed Aug 9, 2021
@agocke
Copy link
Member

agocke commented Aug 23, 2021

Fixed by #57150 and #57089

@agocke agocke closed this as completed Aug 23, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants