.net Azure devops构建失败的NETFramework,版本=v4.6.1;没有找到

.net Azure devops构建失败的NETFramework,版本=v4.6.1;没有找到,.net,azure,azure-devops,.net,Azure,Azure Devops,我已经描述了.net解决方案。其基本上是.net核心应用程序,它引用了两个.net标准投影。 .net核心api项目是容器化的,我可以作为linux停靠应用程序在本地启动应用程序 现在我将源代码移动到azure devops,无法构建应用程序。它不断地失败,并发出以下信息: 更新: azure-pipelines.yml 此项目引用framework“.NETFramework,Version=v4.6.1”中的程序集。您可以从解决方案中删除项目或修复项目依赖项 /home/vsts/work

我已经描述了.net解决方案。其基本上是.net核心应用程序,它引用了两个.net标准投影。 .net核心api项目是容器化的,我可以作为linux停靠应用程序在本地启动应用程序

现在我将源代码移动到azure devops,无法构建应用程序。它不断地失败,并发出以下信息:

更新: azure-pipelines.yml


此项目引用framework“.NETFramework,Version=v4.6.1”中的程序集。您可以从解决方案中删除项目或修复项目依赖项

/home/vsts/work/1/s/MyProject/MyProject.Tests/MyProject.Tests.csproj

Build FAILED.

/usr/share/dotnet/sdk/2.2.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets(33,5): warning NETSDK1059: The tool 'Microsoft.EntityFrameworkCore.Tools.DotNet' is now included in the .NET Core SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). [/home/vsts/work/1/s/MyProject/MyProject.Web.API.csproj]
/usr/share/dotnet/sdk/2.2.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets(33,5): warning NETSDK1059: The tool 'Microsoft.EntityFrameworkCore.Tools.DotNet' is now included in the .NET Core SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). [/home/vsts/work/1/s/MyProject/MyProject/MyProject.eb.API/MyProject.Web.API.csproj]
LocationDbContext.cs(29,32): warning CS0114: 'LocationDbContext.SaveChangesAsync(CancellationToken)' hides inherited member 'DbContext.SaveChangesAsync(CancellationToken)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [/home/vsts/work/1/s/MyProject/MyProject.MyProject.Infrastructure/MyProject.Infrastructure.csproj]
/usr/share/dotnet/sdk/2.2.104/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/vsts/work/1/s/MyProject/MyProject.Tests/MyProject.Tests.csproj]
    3 Warning(s)
    1 Error(s)

Time Elapsed 00:01:21.41
##[error]Bash exited with code '1'.
##[section]Finishing: dotnet build Release
trigger:
- master

pool:
  vmImage: 'Ubuntu-16.04'

variables:
  buildConfiguration: 'Release'

steps:
- script: dotnet build MyProject/MyProject.sln --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'