Azure DevOps Build fails for ASPNETCore 2.1 MVC application

*爱你&永不变心* 提交于 2019-12-24 18:43:09

问题


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.

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.

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.

SOLUTION

This solved my issue.

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


回答1:


Did you try switching to the VS 2019 agents ? Although i dont see any reason why this wouldn't work based on the dependancies installed on the VS2017 agents (1). Microsoft does suggest using the VS2019 agents for DotNet Core development (2).

Something else to look into, are there other projects in your solution that are referencing an older version of core which might cause this conflict in versions?

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




回答2:


Thanks to below link which solved my issue.

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

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.



来源:https://stackoverflow.com/questions/57172204/azure-devops-build-fails-for-aspnetcore-2-1-mvc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!