locked
.NET Standard Library using .NETStandard1.6 does not work RRS feed

  • Question

  • User210773 posted

    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.

    Tuesday, January 17, 2017 12:26 AM

Answers

  • User18049 posted

    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.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, January 17, 2017 1:16 PM

All replies

  • User18049 posted

    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.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, January 17, 2017 1:16 PM
  • User210773 posted

    Thank you. I am moving to VS2017 to address this issue.

    Tuesday, January 17, 2017 1:40 PM
  • User272016 posted

    @hz10 said: 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).

    Tuesday, January 17, 2017 9:42 PM
  • User210773 posted

    VS2017 is RC now, but still very buggy. I will see if I can live with those bugs.

    Tuesday, January 17, 2017 10:56 PM