Forum

error NETSDK1141: U...
 
Notifications
Clear all

error NETSDK1141: Unable to resolve the .NET SDK version as specified in the global.json located at C:\..\src\global.json.

2 Posts
1 Users
0 Reactions
320 Views
Posts: 24
Admin Registered
Topic starter
(@rijwan-ansari)
Illustrious Member
Joined: 4 years ago

error NETSDK1141: Unable to resolve the .NET SDK version as specified in the global.json located at C:\...\src\global.json.

1 Reply
Posts: 24
Admin Registered
Topic starter
(@rijwan-ansari)
Illustrious Member
Joined: 4 years ago

I was getting this error because of missing SDK for the project. Since this is a existing project and I downloaded from GitHub to add/modify the project. 

Solution:

First we need to verify the SDK required for this project. As suggested by error, we can open the global.json file and check SDK required for this project.

As per my project, I opened the global.json SDK and found below code:

{
	"sdk": {
		"version": "3.1.102",
		"rollForward": "latestFeature"
	}
}

As per this global.json file, I need to have .NET core SDK 3.1.102. 

We can download and install from Microsoft site.

https://dotnet.microsoft.com/en-us/download/dotnet/3.1

Note: You can download latest version of 3.1.XXX. Also, as per your OS, download SDK.

After downloading, install it like normal installation. 

Finally, restart Visual Studio and open the project. 

Rebuild the solution, the mentioned error/issue will be resolved.

Reply
Share: