我正在尝试为我的ASP.NET Core 2.0 Web应用程序设置Build on VSTS,但它在Nuget Restore阶段失败:
Package Microsoft.Extensions.FileProviders.Physical 2.0.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.Extensions.FileProviders.Physical 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.VisualStudio.Web.CodeGeneration.Contracts 2.0.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.VisualStudio.Web.CodeGeneration.Contracts 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
当我创建构建时,我选择了Azure中的App Service(或类似的东西).那么,我该如何设置Build呢?
解决方法
而是使用.Net Core还原任务.
关于NuGet还原,您需要用户4.3版本:
>添加NuGet Tool Installer任务(要安装的NuGet.exe版本:4.3.0)> NuGet恢复任务(版本2. *)