本文介绍了ASPNETCore 2.1 MVC应用程序的Azure DevOps生成失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

We are using Azure DevOps and we have a build pipeline which is continous integration. When I checkin my code into Azure DevOps branch my Build pipeline kicks on and it works good.

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

Our company is new to .NET Core so as learning process I added ASP.NET Core 2.1 MVC application to my solution. Locally everything is working fine. When I check in my code my Azure DevOps build pipeline kicks off and it fails. Our build pipeline is VS Hosted 2017 agent.

我遇到了Azure DevOps中的错误

I get below errors in 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/

推荐答案

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

Thanks to below link which solved my issue.

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

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

I added new NuGet tool installer task in my Azure DevOps build pipeline. As the link says I used 4.7.1 as Version of NuGet.exe to install. After adding the task build succeeds.

这篇关于ASPNETCore 2.1 MVC应用程序的Azure DevOps生成失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 04:47