【发布时间】:2021-05-22 14:00:41
【问题描述】:
我目前正在为 .netcore 项目在 Azure Devops 中为 .netcore buildandpush 设置一个 dockerfile。 我在“RUN dotnet restore”中遇到以下错误。
The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 3.1.
我正在使用以下 SDK 进行构建。
FROM microsoft/aspnetcore-build:2.0 AS build
我尝试使用指定的构建修改上述内容,我得到了同样的错误。 1.我应该在yaml文件中添加安装.NET core SDK的任务吗? 2.我有一个解决方案文件和 4 个 csproj 文件。当我使用 Visual Studio 构建时,它会提供多个 dll。在 dockerfile 中,我只给出了以下内容:
ENTRYPOINT ["dotnet", "Example.dll"]
如何传递所有 dll?
【问题讨论】:
标签: docker asp.net-core azure-devops yaml