我有这样的消息错误:
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'
当我运行这个命令时它会发生:
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
但在项目中,我可以看到参考
在我的Dockerfile中,我想我已经提供了所有必要的信息:
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet","WebApi.dll"]
你知道这种情况会出现什么问题吗?
更新:
dotnet恢复通信后变为:
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'
它仍然是同样的情况.但现在恢复后它不再改变了.
最佳答案
原文链接:https://www.f2er.com/docker/436850.html