I have message error like this:
Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.aspnetcore.antiforgery', version: '1.1.1', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Antiforgery.dll'
And its happening when I run this commands:
dotnet build -o obj/Docker/publish -c Release
dotnet publish -o obj/Docker/publish -c Release
docker build -t webapi .
docker run -p 80:80 --name api webapi
But in project, I can see reference
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="1.1.1" />
And in my Dockerfile I think I put all necessary information:
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "WebApi.dll"]
Have you any idea what can be a problem for this situation?
UPDATE:
After dotnet restore
communicate change into:
Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.extensions.dependencyinjection.abstractions', version: '1.1.0', path: 'lib/netstandard1.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll'
And its still this same situation. But now after restore its don't change anymore.
To fix this error I have to changed my WORKDIR. It was reported in GitHub
WORKDIR /app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With