Reputation: 1142
I created new Console App(.NET Core) and i am trying to add package with NuGet the package is : Microsoft.Extensions.Configuration When I click install I get this message:
Package restore failed. Rolling back package changes for 'ConsoleApp1'.
Upvotes: 3
Views: 1627
Reputation: 1468
I am glad that your problem is resolved, however I believe the solution you found may be coincidental as the Microsoft.Extensions.Configuration has no dependencies on Microsoft.ApplicationInsights.AspNetCore, but Microsoft.ApplicationInsights.AspNetCore does depend on Microsoft.Extensions.Configuration v1.0.0
I had similar issues yesterday, the same day that many Microsoft .net Core v2.0.0 NuGet packages were pushed to NuGet. I was inadvertently attempting to add v2.0.0 NuGet packages to my .net Core v1.x app, which gave the error
Restoring packages for C:\Users\MrSlim_Is_Awesome\documents\visual studio 2017\Projects\WebApplication4\WebApplication4\WebApplication4.csproj... Package Microsoft.Extensions.Configuration 2.0.0 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Extensions.Configuration 2.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package restore failed. Rolling back package changes for 'WebApplication4'. Time Elapsed: 00:00:02.1768927 ========== Finished ==========
The solution was to select a v1.x.x version of the relevant Microsoft NuGet package.
Upvotes: 1