2

I'm getting this error trying to restore NuGet packages in my solution. I have tried all the proposed solutions at both these questions:

1) The dependency microsoft.aspnetcore.mvc 1.0.0 does not support framework .NETCoreApp, Version=v1.0

2) Solving error "Microsoft.NETCore.App 1.0.0 does not support framework .NETFramework,Version=v4.6.1"

I have Visual Studio 2015 Update 3 and the .NET Core Tools Update 2.

I have two projects in my solution. Here are the hopefully relevant parts from the project.json's:

project1 - project.json:

...
    "dependencies": {
        ....
        "Microsoft.AspNetCore.Mvc": "1.0.0", // Error here
        ....
     }
...
    "frameworks": {
        "net451": {
            "dependencies": {
                 "Microsoft.NETCore.Platforms": "1.0.1"
             }
         },

       "netcoreapp1.0": {
            "dependencies": {
                  "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" }
             },

           "imports": [
               "dnxcore50",
                "portable-net451+win8"
            ]
        }
    },

...

project2 - project.json:

...
    "dependencies": {
        ....
        "Microsoft.AspNetCore.Mvc": "1.0.0", // Error here
        "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0",
        ....
     }
...
    "frameworks": {
       "netcoreapp1.0": {
           "imports": [
               "dnxcore50",
                "portable-net451+win8"
            ]
        }
    },

...

EDIT: Issue appears to be that NuGet package manager thinks I'm using the old .NET Core, 1.0.0-preview1-002702. But I just installed the latest .NET Core tools here: https://www.microsoft.com/net/core#windows

If I navigate to Help -> About Microsoft Visual Studio, I see this:

Microsoft .NET Core Tools (Preview 2) 14.1.20624.0

That looks correct. Why doesn't package manager console recognize that I have Preview 2 downloaded?

Community
  • 1
  • 1
Nick
  • 1,864
  • 5
  • 27
  • 49

0 Answers0