aspnetcore: dnxcore50 error NU1002: The dependency Microsoft.AspNetCore.Mvc.Razor 1.0.0-rc2-16991 in project .. does not support framework DNXCore,Version=v5.0.

NOTE Read: https://github.com/aspnet/Announcements/issues/150

With the move to Microsoft.AspNetCore I can’t seem to get the packages Microsoft.AspNetCore.Mvc or Microsoft.AspNetCore.Mvc.Razor for dnxcore50 from the Nuget feeds.

When I add a dependency on

        "Microsoft.AspNetCore.Mvc": "1.0.0-*",
or
        "Microsoft.AspNetCore.Mvc.Razor": "1.0.0-*",

they are not found when running dnx-coreclr-win-x64.1.0.0-rc2-16357

The feeds I tried are the old ones still used in aspnet/Mvc https://github.com/aspnet/Mvc/blob/dev/NuGet.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
    <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

But also the one mentioned in https://github.com/aspnet/Announcements/issues/149

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
    <add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" />
    <add key="dotnet-cli" value="https://www.myget.org/F/dotnet-cli/api/v3/index.json" />
  </packageSources>
</configuration>

But both seem to restore with some NotFound messages. And a dnu build or dotnet compile spits out

error NU1002: The dependency Microsoft.AspNetCore.Mvc.Razor 1.0.0-rc2-16991 in project  ... does not support framework DNXCore,Version=v5.0.

So the project won’t compile/run.

I removed all the .dnx\packages and .nuget\packages and that does not help.

Any idea if or when the rename is finished, and what feeds are the correct feeds to use?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 30 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@IRooc Last try, sorry my last comment was to fix it on “dnu/dnx” not dotnet.

Try adding this line to your frameworks:

    "frameworks": {
        "dnxcore50": { 
            "imports": "portable-net451+win8"
        }
    }