Frameworks section of project.json

Asked

Viewed 63 times

1

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

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

Now I don’t understand exactly what that means. I know that there are now different versions of CLR that can be used, there is . NET full and has the CLR Core which is lighter. But in this section it has basically "dnx451" and "dnxcore50" and I didn’t 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 settings? So for example, by putting "dnx451" I’m defining that the project can run on . Complete NET and by putting "dnxcore50" I am defining that the project can also run on Core CLR?

And then in the objects corresponding to "dnx451" and "dnxcore50" the idea is 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?

1 answer

1


I know that now there are different versions of CLR that can be used, have the . NET complete and have the Core CLR that is lighter. But in this section there are basically "dnx451" and "dnxcore50" and I didn’t quite understand that.

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

My understanding is the following: the idea is to have a section in which for each Runtime in which the project can run it is possible to give specific settings?

Yes.

So for example, by putting "dnx451" I’m defining that the project can run on . Complete NET and by putting "dnxcore50" I am defining that the project can also run on Core CLR?

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

And then in the objects corresponding to "dnx451" and "dnxcore50" the idea is 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. Specific settings for each environment.

The dnxcore50 would be for everything. The dnx451 for Desktop. Possibly new environments may appear, but without needing to change the specification.

The minutiae of the configuration are here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.