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

我正在尝试为我的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. *)

相关文章

本文将从上往下,循序渐进的介绍一系列相关.NET的概念,先从...
基于 .NET 的一个全新的、好用的 PHP SDK + Runtime: Pe...
.NET 异步工作原理介绍。
引子 .NET 6 开始初步引入 PGO。PGO 即 Profile Guided Opti...
前言 2021/4/8 .NET 6 Preview 3 发布,这个版本的改进大多来...
前言 开头防杠:.NET 的基础库、语言、运行时团队从来都是相...