You can specify different dependencies for each platforms:
"net45": {
"frameworkAssemblies": {
"System.Linq": "4.1.0"
}
},
"netstandard1.3": {
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Linq": "4.1.0-rc2"
}
},
"netstandard1.4": {
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Linq": "4.1.0"
}
}
When this project is compiled and packed, each framework target will use a different set of dependencies:
net45
(projects targeting .NET 4.5+) will use the System.Linq
assembly from the GAC.netstandard1.3
(.NET Core projects targeting .NET Standard 1.3) will use the NETStandard.Library
version 1.6.0 NuGet package, and the System.Linq
prerelease version 4.1.0-rc2 NuGet package.netstandard1.4
will use the same version of NETStandard.Library
, but the release 4.1.0 version of System.Linq
.