无法构build在Docker中引用PCL的ASP.NET Core应用程序
我正在尝试使用以下Dockerfile构build一个ASP.NET Core docker镜像:
FROM microsoft/aspnetcore-build:1.1.1 WORKDIR /app COPY src . RUN dotnet restore RUN dotnet publish --output /out/ --configuration Release EXPOSE 5000 ENTRYPOINT ["dotnet","/out/MyWebApp.dll"]
生成失败,并提供以下错误:
/app/MyPCL/MyPCL.csproj(70,3):错误MSB4019:导入的项目“/usr/share/dotnet/sdk/1.0.1/Microsoft/Portable/v4.5/Microsoft.Portable.CSharp.targets”没find。 确认声明中的path是正确的,并且该文件存在于磁盘上。
所以在构buildPCL库时遇到了问题,因为找不到Microsoft.Portable.CSharp.targets。
我的PCL项目文件具有以下导入语句:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
我正在考虑导致这个问题,因为这个path不能存在于docker集装箱中。 顺便说一句,该项目在Visual Studio 2017中build立和运行完美。
有任何想法吗?
- 将Docker容器从Visual Studio 2017 RTM部署到生产服务器
- dnu发布后ASP.Net VNext不能在linux机器上工作
- Identity Server 4和Docker
- 通过docker容器从控制台应用程序连接到redis
- 我如何提供应用程序configuration到我的在Docker容器中运行的.NET Core Web API服务?
- 使用适用于Docker的Visual Studio工具部署和debugging远程Linux Docker容器
- Linux Docker中的SQL Server实例string连接
- 如何在Docker容器中运行.NETunit testing
- 在Docker容器内运行的Identity Server 4例外:无法加载DLL“System.Security.Cryptography.Native.OpenSsl”