To help reproduce the problem, the following steps are taken to create a .NETStandard1.6 PCL in Visual Studio 2015:
The following error occurs:
>C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets(140,5): error : Your project is not referencing the ".NETPlatform,Version=v5.0" framework. Add a reference to ".NETPlatform,Version=v5.0" in the "frameworks" section of your project.json, and then re-run NuGet restore.
The following is project.json:
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.6": {}
}
}
Could anyone offer a tip on how to Add a reference to ".NETPlatform,Version=v5.0" in the "frameworks" section? I tried the following:
"donet5.4": {}
"donet5.0": {}
Neither works.
For VS2015 at the very end of the .csproj file, add:
<PropertyGroup>
<NuGetTargetMoniker>.NETStandard,Version=v1.6</NuGetTargetMoniker>
</PropertyGroup>
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