Shaun Luttin Shaun Luttin - 1 year ago 283
ASP.NET (C#) Question

Package [some package] is not compatible with netcoreapp1.0


dotnet restore
we are receiving the following error:

Package Microsoft.AspNet.SomePackage 5.6.7 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNet.SomePackage 5.6.7 supports: net45 (.NETFramework,Version=v4.5)

Our project.json looks like this:

"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
"dependencies": {
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNet.SomePackage": "5.6.7",
"Microsoft.NETCore.App": "1.0.0-*"
"frameworks": {
"netcoreapp1.0": {
"imports": [
"runtimes": {
"win8-x64": {}

How can we
dotnet restore
dotnet run
in a way that runs our app?

Answer Source

The short answer is, you can't. In some narrow cases you can use imports to override nuget's built in dependency rules. In this case you cannot, .NET Framework and .NET Core are incompatible. The errors says the package only supports net45 (.NET Framework 4.5). You cannot use it with your .NET Core application

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download