Usually we see the following targets in project.json
:
"frameworks": {
"net45": {},
"dnx451": {},
"dnxcore50": { }
}
dnxcore50
will be the only portable version of the project code and dnx451
actually targets .Net 4.5.1 mscorlib etc...
Now, if I add another target called dnx50
, this will create a valid output and works just fine.
The difference between dnx451 and dnx50 is, that it references different .Net assembly dlls
For example mscorlib.dll
:
- dnx451 references
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll
- dnx50 references
C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
which essentially is the .net 4.6 version.
Question now is:
Does it make sense to create that dnx50
target for your custom library for example? Basically to target .net 4.6 and you need certain functionality the dnxcore50
portable doesn't have?
Or is the dnx451
target actually enough, and if I don't need a specific feature from the more recent .net versions (4.5.2, 4.6), this target would use .net 4.6 anyways if it is installed on the system and I'm just targeting the lowest version necessary for my project?
Does that mean that having both, a dnx451 and dnx50 target, would actually create the same output, right?