Creating a standard .NET project fails with useless message

When I try to create a project focused on .NET Standard 1.3 (the class library that will be used by the Xamarin application), I get the following message and an unsuccessful build:

Error: your project does not reference the ".NETPlatform, Version = v5.0" framework. Add a link to ".NETPlatform, Version = v5.0" in the "framework" section of your .json project, and then restart NuGet recovery.

project.json looks like this (I did not edit it, this is what was originally created for me):

 { "supports": {}, "dependencies": { "Microsoft.NETCore.Portable.Compatibility": "1.0.1", "NETStandard.Library": "1.6.0", "Newtonsoft.Json": "9.0.1", "NJsonSchema": "6.5.6190.16910" }, "frameworks": { "netstandard1.3": {} } } 

There is no information on the Internet on how to add the link that it adds, and the values ​​it gives do not work as they are.

How do I create this project?

Update:

I tried this https://github.com/dotnet/roslyn/issues/12918 , and the error output was updated to

 Error : Your project is not referencing the ".NETStandard,Version=v1.3" framework. Add a reference to ".NETStandard,Version=v1.3" in the "frameworks" section of your project.json, and then re-run NuGet restore. 

Update:

I realized that he is trying to build another project in the solution and gives thousands of errors in lines

System.Object not defined or not imported

+5
source share
1 answer

Since the release of VS 2017, I upgraded my project to .NET Standard using the new csproj style. It seems that .NET has abandoned project.json, so I am closing this question.

0
source

Source: https://habr.com/ru/post/1261294/


All Articles