Under the project.json project system I was able to specify framework assembly dependencies per framework. The dotnet docs (now out of date) show the below example.
{
"frameworks":{
"net20":{
"frameworkAssemblies":{
"System.Net":""
}
},
"net35":{
"frameworkAssemblies":{
"System.Net":""
}
},
"net40":{
"frameworkAssemblies":{
"System.Net":""
}
},
"net45":{
"frameworkAssemblies":{
"System.Net.Http":"",
"System.Threading.Tasks":""
}
},
".NETPortable,Version=v4.5,Profile=Profile259": {
"buildOptions": {
"define": [ "PORTABLE" ]
},
"frameworkAssemblies":{
"mscorlib":"",
"System":"",
"System.Core":"",
"System.Net.Http":""
}
},
"netstandard16":{
"dependencies":{
"NETStandard.Library":"1.6.0",
"System.Net.Http":"4.0.1",
"System.Threading.Tasks":"4.0.11"
}
},
}
}
How do I do this under csproj for the updated dotnet sdk v1.1.1? I want to reference System.Configuration for net40, but not for netstandard 1.6.