dnxcore50 framework support in ASP.Net 5 Class Library Package project?
Asked Answered
T

1

3

I am trying to develop my first ASP.Net web application and in my solution I have two projects. A Web Application and Class Library (Package) and noticed that the Web App has this for it's framework inside the project.json

"frameworks": {
    "dnxcore50": { }
}

My understanding is that code makes my Web App target Net 5.0 Core but if I look at the project.json for the Class Library I see this:

"frameworks": {
    "net451": { },
    "dotnet5.4": {
        "dependencies": {
            "Microsoft.CSharp": "4.0.1-beta-23516",
            "System.Collections": "4.0.11-beta-23516",
            "System.Linq": "4.0.1-beta-23516",
            "System.Runtime": "4.0.21-beta-23516",
            "System.Threading": "4.0.11-beta-23516"
        }
    }
}

I have never heard of dotnet5.4 and what I read from google just confuses me. I think the net451 is the equivalent to dnx451 but I am not 100% on that.

What do I need to change in my project.json to get it to target the new .Net 5.0 core?

Tinhorn answered 19/12, 2015 at 3:18 Comment(0)
H
4

This is the result of the upcoming .NET Standard Platform. You can see the changes regarding this specific to rc1 here, the main part being;

Only class libraries should change to target net4x and dotnet5.x. For class libraries the recommended conversion steps are:

In project.json:

  • Change dnx4x to net4x (e.g. dnx451 to net451)
  • Change dnxcore50 to dotnet5.4

And in your CS files:

  • Change #if DNX451 to #if NET451
  • Change #if DNXCORE50 to #if DOTNET5_4
Hightension answered 19/12, 2015 at 6:44 Comment(1)
Thanks. That bring up another problem/question I have about Entity Framework 7. Can you take a look at #34371374 and if you know the answer give me another hand?Tinhorn

© 2022 - 2024 — McMap. All rights reserved.