ASPNETCore 2.1 MVC应用程序的Azure DevOps生成失败

时间:2019-07-23 21:05:41

标签: azure-devops asp.net-core-2.1

我们正在使用Azure DevOps,并且我们有一个持续集成的生成管道。当我将代码签入Azure DevOps分支时,构建管道会启动,并且运行良好。

我们公司是.NET Core的新手,因此在学习过程中,我向解决方案中添加了ASP.NET Core 2.1 MVC应用程序。在本地,一切正常。当我签入代码时,我的Azure DevOps构建管道开始,并且失败。 我们的构建管道是VS Hosted 2017代理。

我遇到了Azure DevOps中的错误

The nuget command failed with exit code(1) and error(Errors in D:\a\1\s\Code\MyProject\MyProject.csproj
    Package Microsoft.VisualStudio.Web.CodeGeneration.Design 2.1.9 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.VisualStudio.Web.CodeGeneration.Design 2.1.9 supports:
      - net461 (.NETFramework,Version=v4.6.1)
      - netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.9 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.9 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Antiforgery 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Antiforgery 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.Core 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.Core 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.Facebook 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.Facebook 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.MicrosoftAccount 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.MicrosoftAccount 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.JwtBearer 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.JwtBearer 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.Google 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.Google 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.Cookies 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.Cookies 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Localization.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Localization.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Logging.Debug 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Debug 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.HttpsPolicy 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.HttpsPolicy 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Logging.EventSource 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.EventSource 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNet.WebApi.Client 5.2.4 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNet.WebApi.Client 5.2.4 supports:
      - net45 (.NETFramework,Version=v4.5)
      - netstandard2.0 (.NETStandard,Version=v2.0)
      - portable-net45+netcore45+wp8+wp81+wpa81 (.NETPortable,Version=v0.0,Profile=wp8+netcore45+net45+wp81+wpa81)
    Package Microsoft.Extensions.Logging 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.FileProviders.Composite 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileProviders.Composite 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Options 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Options 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.SpaServices.Extensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.SpaServices.Extensions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.FileProviders.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileProviders.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Server.IISIntegration 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Server.IISIntegration 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Server.Kestrel 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Server.Kestrel 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.OpenIdConnect 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.OpenIdConnect 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Caching.Memory 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Caching.Memory 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Http.Connections.Common 1.0.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Http.Connections.Common 1.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Localization 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Localization 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.ObjectPool 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.ObjectPool 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.Ini 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Ini 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Options.ConfigurationExtensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Options.ConfigurationExtensions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Diagnostics.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Diagnostics.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.OAuth 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.OAuth 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Razor.Runtime 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Razor.Runtime 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Hosting.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Hosting.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authorization 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authorization 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Owin 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Owin 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Connections.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Connections.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.SpaServices 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.SpaServices 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.JsonPatch 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.JsonPatch 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.KeyPerFile 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.KeyPerFile 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Formatters.Xml 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Formatters.Xml 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Primitives 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Primitives 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.Json 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Json 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Caching.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Caching.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.SignalR.Protocols.Json 1.0.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.SignalR.Protocols.Json 1.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Identity.Core 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Identity.Core 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Hosting.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Hosting.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.ResponseCaching 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.ResponseCaching 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Diagnostics 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Diagnostics 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.WebSockets 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.WebSockets 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.UserSecrets 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.UserSecrets 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.TagHelpers 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.TagHelpers 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Hosting 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Hosting 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.WebEncoders 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.WebEncoders 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.FileSystemGlobbing 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileSystemGlobbing 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Hosting 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Hosting 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.WebUtilities 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.WebUtilities 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.CommandLine 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.CommandLine 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Cors 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Cors 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authorization.Policy 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authorization.Policy 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.DependencyInjection.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.DependencyInjection.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Localization 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Localization 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Logging.Console 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Console 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.Xml 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Xml 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Logging.Configuration 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Configuration 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.ApiExplorer 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.ApiExplorer 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Rewrite 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Rewrite 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.ResponseCaching.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.ResponseCaching.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.DataAnnotations 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.DataAnnotations 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Localization 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Localization 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Logging.TraceSource 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.TraceSource 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.ResponseCompression 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.ResponseCompression 2.1.0 supports:
      - net461 (.NETFramework,Version=v4.6.1)
      - netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Logging.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.Twitter 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.Twitter 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.EnvironmentVariables 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.EnvironmentVariables 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Http.Features 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Http.Features 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Localization.Routing 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Localization.Routing 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Razor 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Razor 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.RazorPages 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.RazorPages 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Identity.Stores 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Identity.Stores 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.ViewFeatures 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.ViewFeatures 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Server.HttpSys 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Server.HttpSys 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.EntityFrameworkCore.SqlServer 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.EntityFrameworkCore.SqlServer 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Razor.Language 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Razor.Language 2.1.0 supports:
      - net46 (.NETFramework,Version=v4.6)
      - netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Formatters.Json 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Formatters.Json 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Authentication.WsFederation 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Authentication.WsFederation 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.FileExtensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.FileExtensions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Configuration.Binder 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Binder 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.MiddlewareAnalysis 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.MiddlewareAnalysis 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Caching.SqlServer 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Caching.SqlServer 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Identity.EntityFrameworkCore 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Identity.EntityFrameworkCore 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.EntityFrameworkCore.InMemory 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.EntityFrameworkCore.InMemory 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Core 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Core 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Html.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Html.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Http.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Http.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.DataProtection.Extensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.DataProtection.Extensions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.HostFiltering 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.HostFiltering 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Razor 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Razor 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.NodeServices 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.NodeServices 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.Http 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Http 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.StaticFiles 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.StaticFiles 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.DataProtection.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.DataProtection.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Identity 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Identity 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Cors 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Cors 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Identity.UI 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Identity.UI 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Session 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Session 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Routing.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Routing.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
     Package Microsoft.AspNetCore.Routing 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Routing 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.EntityFrameworkCore 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.EntityFrameworkCore 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
           Package Microsoft.AspNetCore.Cryptography.Internal 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Cryptography.Internal 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.HttpOverrides 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.HttpOverrides 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.Extensions.FileProviders.Physical 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileProviders.Physical 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.AspNetCore.Mvc.Razor.Extensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.Mvc.Razor.Extensions 2.1.0 supports:
      - net46 (.NETFramework,Version=v4.6)
      - netstandard2.0 (.NETStandard,Version=v2.0)
    Package Microsoft.EntityFrameworkCore.Relational 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.EntityFrameworkCore.Relational 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
    One or more packages are incompatible with .NETCoreApp,Version=v2.1.)
1 more errors. Click on expand view in the context menu to view complete logs.

解决方案

这解决了我的问题。

https://zimmergren.net/azure-devops-vsts-package-version-is-not-compatible-with-netcoreapp-supports-netstandard/

2 个答案:

答案 0 :(得分:0)

您是否尝试过切换到VS 2019代理? 虽然我看不到基于VS2017代理(1)上安装的依赖关系无法运行的任何原因。 Microsoft确实建议使用VS2019代理进行DotNet Core开发(2)。

还有其他需要研究的地方,您的解决方案中是否还有其他项目引用了较早版本的core,这可能会导致版本冲突?

1:https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2017-Server2016-Readme.md

2:https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#use-a-microsoft-hosted-agent

答案 1 :(得分:0)

感谢以下链接解决了我的问题。

https://zimmergren.net/azure-devops-vsts-package-version-is-not-compatible-with-netcoreapp-supports-netstandard/

我在Azure DevOps构建管道中添加了新的NuGet工具安装程序任务。如链接所示,我使用4.7.1作为NuGet.exe的版本进行安装。添加任务后,构建成功。

相关问题