Microsoft.Composition supports .NET Framework 4.5, Windows 8 and WindowsPhone 8.1 among other targets, this means it should work.
But it doesn't target netstandard1.x
specifically neither does it netcoreapp1.x
, so you need to tell nuget via the import section to also restore PCL Libraries which target the platforms above:
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
},
"imports": ["dnxcore50", "portable-net45+win8"]
}
}
The "portable-net45-win8"
part tells it, to also restore PCLs with .NET 4.5 and Windows 8 targets too, as they should work in 99% of all cases with .NET Core (Windows Runtime is based on System.Runtime and .NET Core is too, that's why it works).
But NEVER use import
to restore non-PCL or PCL which don't support at least win8/wpa8 and net45.
Update for csproj:
To do that in the new .csproj
project structure, you need to add
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
instead. Optionally leave out dotnet5.6
and dnxcore50
when you're sure you don't use any packages which use any of these.