Deploying .net application for docker gives "Microsoft.DotNet.Props" error not found

I have a Windows 10 Home operating system. I installed the Docker toolbar. I want to deploy my .net application for Docker. I created a Docker file, citing the following useful article: https://stormpath.com/blog/tutorial-deploy-asp-net-core-on-linux-with-docker

My docker file is as follows:

FROM microsoft/dotnet:latest
COPY . /app
WORKDIR /app

RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]

EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000

ENTRYPOINT ["dotnet", "run"]

But when I run the docker command to create the image, it gives me an error.

user@machine_name MINGW64 path to solution
$  docker build -t helloWorld:core .

Error:

/app/Web.xproj(7,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/1.0.0-rc4-004771/Microsoft/VisualStudio/v14.0/DotNet/Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
The command 'dotnet restore' returned a non-zero code: 1

Could someone please direct what is wrong here because I am completely new to Docker.

+4
1

Web.xproj , , , github. , Microsoft SDK, .csproj project.json. 1.1-sdk-projectjson:

FROM microsoft/dotnet:1.1-sdk-projectjson

microsoft/dotnet/ :

latest project.json, , csproj/MSBuild. MSBuild, Docker, 1.1.0-sdk-projectjson 1.1.0-sdk-projectjson-nanoserver. , .NET Core sdk MSBuild.

+5

Source: https://habr.com/ru/post/1669371/


All Articles