Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS - Building ASP.NET Core 2.0 app fails with Package Microsoft.Extensions.FileProviders.Physical 2.0.0 is not compatible

I'm trying to set up Build on VSTS for my ASP.NET Core 2.0 web app but it fails on Nuget Restore phase:

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)

When I was creating the build I selected App Service in Azure (or something like that). So, how can I set up Build now?

like image 475
alvipeo Avatar asked Sep 03 '17 21:09

alvipeo


People also ask

Which ASP NET Core package should I use for my application?

All the features of ASP.NET Core 2.x and Entity Framework Core 2.x are included in the Microsoft.AspNetCore.App package. The default project templates targeting ASP.NET Core 2.x use this package. We recommend applications targeting ASP.NET Core 2.x and Entity Framework Core 2.x use the Microsoft.AspNetCore.App package.

Which projects are not compatible with netcoreapp2?

Project Acme.Function.Model is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Project Acme.Function.Model supports: netstandard2.0 (.NETStandard,Version=v2.0) One or more projects are incompatible with .NETCoreApp,Version=v2.0.)

What is the difference between Microsoft aspnetcore and shared framework?

Microsoft.AspNetCore.App is installed when the .NET Core 3.0 or later SDK is installed. The shared framework is the set of assemblies ( .dll files) that are installed on the machine and includes a runtime component and a targeting pack. For more information, see The shared framework.

What is the default package for ASP NET Core and Entity Framework?

All the features of ASP.NET Core 2.x and Entity Framework Core 2.x are included in the Microsoft.AspNetCore.App package. The default project templates targeting ASP.NET Core 2.x use this package.


1 Answers

Using .Net Core restore task instead.

Regarding NuGet restore, you need to user 4.3 version:

  1. Add NuGet Tool Installer task (Version of NuGet.exe to install: 4.3.0)
  2. NuGet restore task (Version 2.*)
like image 90
starian chen-MSFT Avatar answered Sep 26 '22 07:09

starian chen-MSFT