我有这样的消息错误:
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
但在项目中,我可以看到参考
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="1.1.1" />
在我的Dockerfile中,我想我已经提供了所有必要的信息:
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "WebApi.dll"]
你知道这种情况会出现什么问题吗?
更新:
在dotnet restore
将更改传达到:
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'
它的情况仍然如此。但现在恢复后它不再改变了。