Followed the instructions of this Xamarin article to create a .NET Standard PCL. .NETStandard1.6 is selected as the target. The following error occurs when the library is built:
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 remedy this?
BTW, I posted this question on SO.
You can try downgrading to 1.5 instead of using 1.6. If you search for that error message you can find another possible workaround which involves editing the NuGet.targets file or your .csproj file to allow 1.6 to be supported.
Answers
You can try downgrading to 1.5 instead of using 1.6. If you search for that error message you can find another possible workaround which involves editing the NuGet.targets file or your .csproj file to allow 1.6 to be supported.
Thank you. I am moving to VS2017 to address this issue.
VIsual Studio 2017? Guess it is in beta still so you might have some other issues (recently a few people on forum had issues with it).
VS2017 is RC now, but still very buggy. I will see if I can live with those bugs.