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

Improve error message on missing dll in dotnet runtime #3824

Closed
nicolaigj opened this issue Oct 11, 2019 · 4 comments
Closed

Improve error message on missing dll in dotnet runtime #3824

nicolaigj opened this issue Oct 11, 2019 · 4 comments

Comments

@nicolaigj
Copy link

Improve error message on missing dll in dotnet runtime

General

Trying to run dotnet Some.NonExistent.dll with just the dotnet runtime produces a misleading error message telling us that we're missing the SDK instead of telling us that the file is missing. Could the runtime display the same error message as the SDK?

The situation was that we had a tiny spelling error in the script running the app in a docker container, and it wasn't at all apparent that we had misspelled the dll name, spent a fair amount of time trying to figure out what was wrong.

Steps to reproduce

Example using the docker dotnet runtime image:

PS C:\> docker pull mcr.microsoft.com/dotnet/core/runtime:3.0
PS C:\> docker run -it --entrypoint /bin/bash mcr.microsoft.com/dotnet/core/runtime:3.0
root@6f87t213c05f:/# dotnet Some.NonExistent.dll
  It was not possible to find any installed .NET Core SDKs
  Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
      https://aka.ms/dotnet-download

Expected behavior

I would be great that the runtime had the same behavior as the SDK. Running this on my local machine I get an error message I can understand.

PS C:\> dotnet Some.NonExistent.dll
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-Some.NonExistent.dll does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
@scalablecory
Copy link
Contributor

@MichaelSimons any idea what's going on here?

@MichaelSimons
Copy link
Member

@scalablecory - this is not docker specific issue rather it is a question with the dotnet host. I'd suggest moving it to https://github.com/dotnet/core-setup. This looks similar to https://github.com/dotnet/core-setup/issues/3490.

@scalablecory scalablecory transferred this issue from dotnet/core Oct 30, 2019
@vitek-karas
Copy link
Member

/cc @elinor-fung

@elinor-fung
Copy link
Member

Tracked through #2980

@msftgits msftgits transferred this issue from dotnet/core-setup Jan 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
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

5 participants