Targeting multiple frameworks with project.json is simple. However the result are two different
compilations. Take the following example:
{
"version": "1.0.0-*",
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Collections.Immutable": "1.2.0"
},
"frameworks": {
"netstandard1.3": { },
"net451": { }
}
}
The compilation process for the project.json file will lead to two resulting artifacts:
System.Runtime based netstandard world which can be used on .NET Core, .NET Framework (via type forwarders) and Xamarin products (via type forwarders). This dll has references to System.Runtime and System.Collections.Immutable.mscorlib based .NET Framework. This dll will have references to mscorlib and System.Collection.Immutable.However, it is important to understand that the netstandard1.0 based System.Collections.Immutable will utilize different System.Runtime implementations for each build dll at runtime. The System.Runtime which comes with .NET Core does not have any assembly dependencies on its own (since it implements the core library). The System.Runtime used for with the .NET Framework has references (for the type forwarders) to the .NET Framework assemblies mscorlib, System.Core, System and System.ComponentModel.Composition.