VSTS - 构建ASP.NET Core 2.0应用程序失败,包Microsoft.Extensions.FileProviders.Physical 2.0.0不兼容

alv*_*peo 7 azure-devops asp.net-core azure-pipelines

我正在尝试为我的ASP.NET Core 2.0 Web应用程序设置Build on VSTS,但它在Nuget Restore阶段失败:

软件包Microsoft.Extensions.FileProviders.Physical 2.0.0与netcoreapp2.0(.NETCoreApp,Version = v2.0)不兼容.包Microsoft.Extensions.FileProviders.Physical 2.0.0支持:netstandard2.0(.NETStandard,Version = v2.0)

软件包Microsoft.VisualStudio.Web.CodeGeneration.Contracts 2.0.0与netcoreapp2.0(.NETCoreApp,Version = v2.0)不兼容.软件包Microsoft.VisualStudio.Web.CodeGeneration.Contracts 2.0.0支持:netstandard2.0(.NETStandard,Version = v2.0)

当我创建构建时,我选择了Azure中的App Service(或类似的东西).那么,我该如何设置Build呢?

sta*_*SFT 16

而是使用.Net Core还原任务.

关于NuGet还原,您需要用户4.3版本:

  1. 添加NuGet Tool Installer任务(要安装的NuGet.exe版本:4.3.0)
  2. NuGet恢复任务(版本2.*)