Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher

Im am encountering the following build error:

The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK.

enter image description here

Whenever I'm rebuilding a solution, this error will show. Has anybody a clue how to solve this? I'm sure I've installed Visual Studio 2017 (15.3.2) and .NET Core 2.0 properly.

enter image description here

like image 956
lukangkang Avatar asked Aug 29 '17 12:08

lukangkang


People also ask

What is Net SDK error?

This error occurs when the build tools can't find the version of the . NET SDK that's needed to build a project. This is typically due to a . NET SDK installation or configuration issue.

What is my current .NET SDK version?

Checking the Version of Your . Open your project's source folder and, in the address bar, type "cmd" and press Enter. It will open the command prompt with the project path. Execute the following command: dotnet --version . It will display your project's current SDK version,i.e., 2.1.

How do I change .NET SDK?

In order to change default dotnet SDK version, place a global. json file in the current folder or any parent folder with the contents below. You can create the global. json file manually, or use the dotnet cli command dotnet new globaljson .


3 Answers

I had the same issue. Adding <DependsOnNETStandard>false</DependsOnNETStandard> to your csproj file works for now. Have a look at https://github.com/dotnet/sdk/issues/1527 for more information.

like image 80
koelkastfilosoof Avatar answered Oct 22 '22 04:10

koelkastfilosoof


You need to install .Net Core SDK 2.0 along with .Net 2.0 binaries (Runtime). Please install the .Net Core 2.0 SDK based on your Target platform of your project either x86 or x64

.Net Core SDK 2.0 download from here

Sample

like image 1
Balagurunathan Marimuthu Avatar answered Oct 22 '22 03:10

Balagurunathan Marimuthu


I faced the same issue a few days ago. and Adding <DependsOnNETStandard> can not solve my problem. I just uninstalled the 'Microsoft .NET Core …' in Control Pannel. And then install the .net core again. This problem disappeared. Maybe it is a fastest way to resolve this issue.

like image 1
viking Avatar answered Oct 22 '22 03:10

viking