What is the difference between the two dependency sections in project.json

Here is an example from the MVC project (I removed a few elements):

{
    "dependencies": {
        // (1)
        "Helios": "0.1-alpha-build-0585",
        "Microsoft.AspNet.Mvc": "0.1-alpha-build-1268"
    },
    "configurations": {
        "net45": {
            "dependencies": {
                // (2)
                "System.Data": "",
                "System.ComponentModel.DataAnnotations": ""
            }
        },
        "k10": {
        }
    }
}

Can I move System.Data to (1) or move Helios to (2)?

What is the difference, I put the assembly in (1) or (2)?

By the way, what does "" mean in the version?

+4
source share
1 answer

The first node dependencies apply to all configurations. This means that you added Helios to # 1, it will be available for both net45 and k10.

The second section has a configuration. If you add something to k10, it will not be available for net45 and vice versa.

Here is an example of how this will look when you have certain configuration packages.

+3

Source: https://habr.com/ru/post/1544315/


All Articles