Closed danielman111 closed 6 years ago
Can you also share your docker-compose.yml file? From what I can tell, this error message is coming from another place in your build setup, not the microsoft/aspnetcore image itself.
No repro
I got the same error. In my case, I fixed it just change assembly name in entry point, e.g: ENTRYPOINT ["dotnet", "UserServer.dll"] instead ENTRYPOINT ["dotnet", "userserver.dll"]
@gnupot Nice! Were you able to identify the reason for the casing difference?
@muratg for my Dockerfile I got a template from docker's example https://docs.docker.com/engine/examples/dotnetcore/ where entry point was ENTRYPOINT ["dotnet", "aspnetapp.dll"] I just replaced example dll name to my "userserver.dll"
but my Project file contains a tag ``
`` so I get assembly UserServer.dll after compilation
and as I think docker doesn't find "userserver.dll" when I run container
Linux file systems are case sensitive :)
@gnupot Got it. I also just verified that the created assembly name matches the casing of the csproj name (if there's no attribute specifying the assembly name).
@natemcmaster Yep, but I think users can be confused by the error message
Did you mean to run dotnet SDK commands? Please install dotnet SDK from: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
@gnupot Agreed. Didn't realize how unhelpful that error was when the SDK isn't installed. I've opened https://github.com/dotnet/core-setup/issues/3490 to improve this.
try change first line of dockerfile into: FROM microsoft/aspnetcore-build:2.0 AS build-env it resolved my problem with:
"Did you mean to run dotnet SDK commands? Please install dotnet SDK from: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409"
I fixed it by changing the entry point to my dll name. I followed a tutorial, but had a different project name.
For me the casing of the run command had nothing to do with it. But rather referencing the wrong image. For example:
FROM microsoft/aspnetcore:2.0
When it should've been:
FROM microsoft/aspnetcore-build:2.0
I presume this is because microsoft/aspnetcore:2.0
is a runtime-only image.
@pimbrouwers Thanks for putting some light over here, that was the exact issue I was facing. Changing to FROM microsoft/aspnetcore-build:2.0
from FROM microsoft/aspnetcore:2.0
did the trick for me as well.
Hey, guys, just had the same error message: "Did you mean to run dotnet SDK commands?" The project was located on D: drive. Docker has access to both C: and D: drives. Solved the problem by moving project from D: to C:
Hope it will help someone.
Would appreciate a better error message if trying to pass in an entrypoint file for dotnet to run.
I had the same issue on VS 17 v 15.9.5. The project was on drive D: . I fixed it by replacing the project on drive C:
If you are having an issue with microsoft/aspnet, please open an issue on https://github.com/Microsoft/aspnet-docker. This repository is for microsoft/aspnetcore and microsoft/aspnetcore-build.
Steps to reproduce the issue
(e.g. copy your Dockerfile or docker-compose.yml file here)
Expected behavior
Running a created docker image properly
Actual behavior
Getting the following error
Additional information (e.g. issue happens only occasionally)
I'm trying to run an .NET Core 2.0 web app on a Docker container. My project name is LoggerService. I am publishing the project to
LoggerService\obj\Docker\publish\
And than running the command
docker-compose build
The LoggerService image is created, but when trying to run it I am getting the following message:
Output of
dotnet --info
Output of
docker info