.NET Core 2.1 Azure Functions 不会在 Azure Pipelines 中构建
.NET Core 2.1 Azure Functions won't build in Azure Pipelines
当我尝试 运行 我的 Azure 后端函数的管道时,我不断收到此错误:
[error]C:\Users\VssAdministrator.nuget\packages\microsoft.net.sdk.functions.0.27\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): Error : It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
这是一个很老的程序,但是昨天是第一次构建失败,我不知道如何修复它。它发生在开发分支和主分支中,所以我猜这是对 Azure 的更改。
如 this GitHub issue 中所述,.NET Core 2.1 已从所有构建代理映像中删除。
Possible impact
If your project depends on a pre-installed .Net 2.1 it can be broken.
您可以尝试使用 setup dotnet task 显式安装 .NET Core 2.1。
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x'
请注意,自 2021 年 8 月 21 日起,.NET Core 2.1 不再受支持(参见 .NET and .NET Core Support Policy)。升级到当前支持的版本(如 .NET Core 3.1 或更高版本)应该不是很多工作,但值得付出努力。
当我尝试 运行 我的 Azure 后端函数的管道时,我不断收到此错误:
[error]C:\Users\VssAdministrator.nuget\packages\microsoft.net.sdk.functions.0.27\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): Error : It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
这是一个很老的程序,但是昨天是第一次构建失败,我不知道如何修复它。它发生在开发分支和主分支中,所以我猜这是对 Azure 的更改。
如 this GitHub issue 中所述,.NET Core 2.1 已从所有构建代理映像中删除。
Possible impact
If your project depends on a pre-installed .Net 2.1 it can be broken.
您可以尝试使用 setup dotnet task 显式安装 .NET Core 2.1。
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x'
请注意,自 2021 年 8 月 21 日起,.NET Core 2.1 不再受支持(参见 .NET and .NET Core Support Policy)。升级到当前支持的版本(如 .NET Core 3.1 或更高版本)应该不是很多工作,但值得付出努力。