question

PolachanPaily-2805 avatar image
0 Votes"
PolachanPaily-2805 asked ChaoDeng-MSFT edited

The SDK 'Microsoft.NET.Sdk.Web' specified could not be found

I was using asp.net core version 2.0.6 version and the application was running fine on that version , then I
decided to download latest version 3.1.409 but after that I am getting the error as given below

'download latest .net core version The SDK 'Microsoft.NET.Sdk.Web' specified could not be found ' How can I go to previous version to get the application running smoothly, Please help urgent. How can I restore the appropriate version to load the application , I have given below the version before running in csproj file, Please help
102997-sdkversion.txt


dotnet-aspnet-core-mvc
sdkversion.txt (1.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ChaoDeng-MSFT avatar image
0 Votes"
ChaoDeng-MSFT answered ChaoDeng-MSFT edited

Hi @PolachanPaily-2805 ,

The following methods will help you, you can try it.
1.Clean-up obsolete .NET Core versions: Go to Control Panel and uninstall previous .NET Core SDK/Runtime versions (as long as you don't use them anymore).
2.Create a Global.json file: Add a new global.json file to your project's root with the following content (replace the .NET Core version build with the one you want to run the project with):

    { "sdk": { "version": "2.0.5" } }

3.Rename the SDK reference: Open your .proj file and replace <project sdk="Microsoft.NET.Sdk.web"> with <project sdk="Microsoft.NET.Sdk"> .
4.Check your PATH: Verify that both C:\Program Files\dotnet and C:\Program Files (x86)\dotnet are in the PATH environment variable.



If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Best Regards,

ChaoDeng



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.