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

Polachan Paily 226 Reputation points
2021-06-07T11:03:39.69+00:00

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

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,590 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Chao Deng-MSFT 796 Reputation points
    2021-06-08T01:48:28.373+00:00

    Hi @Polachan Paily ,

    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

    1 person found this answer helpful.
    0 comments No comments

  2. Chandrasekar Loganathan 0 Reputation points
    2023-04-06T07:52:18.18+00:00

    '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 Visual studio 2022 upgrade version 17.4 to 17.5 not working

    0 comments No comments

  3. Akshay Chugh 25 Reputation points
    2023-12-08T09:33:22.93+00:00

    On my 64 bit computer: Simply moving the 64 bit dotnet path above the x86 bit dotnet path solved it for me:

    enter image description here

    credit: https://stackoverflow.com/a/68916942

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.