Error after updating .net Core 1.0 to 1.1

I created a new asp.net core web api project and upgraded to version 1.1. I get the following errors:

  • The project was not restored or could not be restored - run dotnet restore WebApplication1 C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Common.Targets

  • The project does not display one of "win10-x64, win81-x64, win8-x64, win7-x64" in the "Runtime" section.

  • You may be trying to publish a library that is not supported. Use dotnet pack to distribute libraries.

Cannot find the runtime target for the .NETCoreApp platform, Version = v1.0, compatible with one of the target runtimes: "win10-x64, win81-x64, win8-x64, win7-x64". Possible reasons: WebApplication1 C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Common.Targets 262

Please advice!

+5
source share
2 answers

Follow the instructions in this article .

You probably have to add this code:

 "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.1.0" } } 
+6
source

You must specify the runtime section in the project.json file. In the project.json project, try adding the following section:

 "runtimes": { "win10-x64": { } } 
+2
source

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


All Articles