Section frameworks of project.json

1

In ASP.NET 5 projects, the project.json file contains some important project data as dependencies in other packages. It turns out that this file has a "frameworks" section that in projects created in VS looks like this:

{
    "frameworks": {
        "dnx451": { },
        "dnxcore50": { }
    }
}

Now I do not understand exactly what that means. I know that now there are different versions of CLR that can be used, have full .NET and have the Core CLR that is lighter. But in that section it basically has "dnx451" and "dnxcore50" and I did not quite understand it.

My understanding is this: the idea is to have a section in which for each runtime in which the project can run it is possible to give specific configurations? So, for example, when I put "dnx451" I'm defining that the project can run in full .NET and when I put "dnxcore50" I'm defining that the project can also run in Core CLR?

And then in the objects corresponding to "dnx451" and "dnxcore50" is the idea to put specific settings for when the application runs in this runtime? For example, dependencies that should be considered only when using one of the two?

    
asked by anonymous 27.02.2015 / 18:17

1 answer

1

I know that there are now different versions of CLR that can be used, have full .NET and have the Core CLR that is lighter. But in that section it basically has "dnx451" and "dnxcore50" and I did not quite understand it.

dnx451 is the section for frameworks related to Desktop development. dnxcore50 is for CLR in general.

My understanding is this: Is the idea to have a section in which for each runtime in which the project can run it is possible to give specific configurations?

Yes.

So for example, when I put "dnx451" I'm defining that the project can run in full .NET and when I put "dnxcore50" I'm defining that the project can also run in Core CLR?

Not exactly. You are telling the application how it should work depending on the environment . As I said up there, if you define libraries in the dnx451 part, the idea is that you are specifying the Desktop part, specifically. The part of Core CLR is that it would be the common place for other environments.

And then in the objects corresponding to "dnx451" and "dnxcore50" is the idea to put specific settings for when the application runs in this runtime? For example, dependencies that should be considered only when using one of the two?

Yes, exactly. Settings specific to each environment.

dnxcore50 would be for everything. The dnx451 for Desktop. Possibly new environments may arise, but without changing the specification.

The minutiae of setting are here .

    
02.05.2015 / 02:10