c# - An assembly specified in the application dependencies manifest was not found: -
i developed application in asp.net-core 2.0 preview1. developed on windows visual studio 2017.
now want deploy linux server using docker.
i created docker file:
from microsoft/aspnetcore:2.0 arg source workdir /app expose 44305 copy ${source:-obj/docker/publish} . entrypoint ["dotnet", "aplication.dll"] after running commands:
dotnet build -o obj/docker/publish -c release dotnet publish -o obj/docker/publish -c release docker build -t testapi-api . docker run -p 44305:80 --name api testapi-api afer last command run getting next error:
an assembly specified in application dependencies manifest (aplication.deps.json) not found: package: 'microsoft.aspnetcore.antiforgery', version: '2.0.0-preview1-final' path: 'lib/netcoreapp2.0/microsoft.aspnetcore.antiforgery.dll' assembly expected in local runtime store application published using following target manifest files: manifest.win7-x64.xml;manifest.win7-x86.xml;manifest.osx-x64.xml;manifest.linux-x64.xml i new asp.net-core , docker. great.
you need specify -r linux-x64 parameter in dotnet publish command that:
dotnet publish -o obj/docker/publish -c release -r linux-x64 this make standalone deployment.
Comments
Post a Comment