I'm trying to install the Nuget Package to use Microsoft.AspNet.Identity.Core 2.2.1 but I get the following error message.
Package Microsoft.AspNet.Identity.Core 2.2.1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.AspNet.Identity.Core 2.2.1 supports: net45 (.NETFramework,Version=v4.5)
One or more packages are incompatible with .NETCoreApp,Version=v1.1.
Package restore failed. Rolling back package changes for 'xxxx'.
I created a brand new project in Visual Stuido 2017 so is nothing to do with anything else I have installed.
The string (.NETFramework,Version=v4.5) is the clue. It means the package cannot be used with ASP.NET Core. It is a sure sign you have the wrong package.
Just because the package name contains the word 'core' doesn't mean it works with ASP.NET core. This explained by Pierre-Loup Pagniez in his answer What is the difference between Microsoft.Aspnet.identity.Core vs Microsoft.AspNetCore.Identity
Related
When I attempt to install Microsoft.Aspnet.Identity.Core version 2.2 with my .net 4.0 project I get the following error:
Could not install package 'Microsoft.AspNet.Identity.Core 2.2.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I understand that it requires .net 4.5+.
Is there an older version of Microsoft.Aspnet.Identity.Core that works with .net 4.0?
More generally, where is the best place to check what version of .net a specific nuget package supports?
I have created project in asp.net MVC with 4.5 framework in 2015 VS. I am trying to add Microsoft.Owin.Host.SystemWeb this package from nuget package manager but getting error like
Could not install package 'Microsoft.Owin 4.0.0'. You are trying to
install this package into a project that targets
'.NETFramework,Version=v4.5', but the package does not contain any
assembly references or content files that are compatible with that
framework.
Even if I changed framework still getting error and
Microsoft.Owin.Host.SystemWeb latest Version of this package is 4.0.
f you are installing last versions of SignalR you will not be able as it has some dependencies that require .Net4.5, but you can still install an old version of SignalR which uses .Net4.0, like
1.1.3 Install-Package Microsoft.AspNet.SignalR -Version 1.1.3
This is not the case any more, and the 2.x releases require .NET 4.5.
https://github.com/SignalR/SignalR/issues/1723
I've installed SignalR.Core and it says the following...
Package 'Microsoft.AspNet.SignalR.Core 2.2.2' was restored using
'.NETFramework,Version=v4.6.1' instead of the project target framework
'.NETCoreApp,Version=v2.0'. This package may not be fully compatible
with your project.
Why would a "Core" version of SignalR be incompatible with .net Core?
That's not the Core version of SignalR, that's the core package of the "classic" version.
SignalR was rewritten from scrach for .NET Core. The first alpha version was released on September 2017 as Microsoft.AspNetCore.SignalR. The latest version is 1.0.0 Alpha 2, released on October.
As the blog post explains, this is a significant redesign. You'll have to experiment with the new SignalR to see how the changes affect your application
You should probably track the Github repository and check this video that explains why SignalR was redesigned
I was having the same problem, I solved installing Microsoft.EntityFrameworkCore before Microsoft.AspNetCore.Identity
PM> Install-Package Microsoft.EntityFrameworkCore -Version 2.2.2
PM> Install-Package Microsoft.AspNetCore.Identity -Version 2.2.0
You can omit -Version to get latest stable version of the Package.
I'm trying to install the Stripe.net 6.12.0 nuget package in my project. It has a dependency on the Json.NET 9.0.1 nuget package which I have installed, but when I go to install stripe.net, visual studio gives me the error message: "Stripe.NET already has a dependency defined for"Newtonsoft.Json'. What do I have to do to install Stripe.NET?
Was not obvious from the error message, but the solution was simply to upgrade Nuget. Was using 2.8.xxx and upgraded to the latest which is 2.12.xxx. Restarted. Fixed the problem.
I am working on an ASP.NET project in which I need to do simple HTML templating.
The prettiest solution seems to be RazorEngine, which depends on Microsoft.AspNet.Razor. However, when trying to install Microsoft.AspNet.Razor via Nuget, the following error message is shown:
Installing 'Microsoft.AspNet.Razor 3.0.0'. Successfully
installed 'Microsoft.AspNet.Razor 3.0.0'. Adding
'Microsoft.AspNet.Razor 3.0.0' to EBulkDBSManagementApp.
Uninstalling 'Microsoft.AspNet.Razor 3.0.0'. Successfully
uninstalled 'Microsoft.AspNet.Razor 3.0.0'. Install failed.
Rolling back... Could not install package
'Microsoft.AspNet.Razor 3.0.0'. You are trying to install this package
into a project that targets '.NETFramework,Version=v4.0', but the
package does not contain any assembly references or content files that
are compatible with that framework. For more information, contact the
package author.
Any solution?
The latest RazorEngine 3.4.0 NuGet package depends on the Microsoft.AspNet.Razor 3.0.0 NuGet package which requires .Net 4.5
If you wish to use RazorEngine with a version of .NET prior to 4.5, then you will need to use the RazorEngine 3.3.0 NuGet pacakage.
You can install this using the package manager console with the following command.
Install-Package RazorEngine -Version 3.3.0