Based on this, basically what I understand is that, assuming the dependency lib comes preinstalled with the framework I should use frameworkAssemblies but if it isn't, in which case it needs to be pulled down by a package manager source and you're supposed to use dependencies.
My question is if I target dotnet which is basically “I’m compatible with any targets that my dependencies are, check those.”, how should I define a reference to System.Threading.Tasks for example?
If I put a
"frameworks": {
"dotnet": {
"dependencies": {
"System.Threading.Tasks": "4.0.10"
}
}
}
would that mean that when running against the full .NET framework, it'll use the bundled library and not the one from GAC?
and if I use
"frameworks": {
"dotnet": {
"frameworkAssemblies": {
"System.Threading.Tasks": "4.0.10"
}
}
}
would that mean that if I publish my website, it wouldn't include the System.Threading.Tasks package?
UPDATE: I feel like I'm getting myself confused here. When I tried
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta7"
},
"frameworks": {
"dotnet": { }
}
I would've expected it to compile. The target frameworks would've been limited to whatever the target of "EntityFramework.SqlServer" (net45, dnxcore50) is. This doesn't work however and I'm getting a The dependency EntityFramework.SqlServer 7.0.0-beta7 in project xxx does not support framework .NETPlatform,Version=v5.0 error instead. It looks like using dotnet is a moniker for targeting BCL only.
Based on what I found out by trying different project.json combinations, it turns out that dotnet may just be a moniker for the .NET platform itself so to answer my question, I think the way to do it is by:
"net45": {
"frameworkAssemblies": {
...
}
},
"dnx451": {
"frameworkAssemblies": {
...
}
},
"dotnet": {
"dependencies": {
...
}
}
This contradicts what targeting dotnet is supposed to fix though? I hope someone from the team would shed some light about this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With