Erro o SDK 'Microsoft.NET.Sdk.Web' especificado não pôde ser encontrado.

kaique silva 20 Reputation points
2024-01-15T16:46:38.43+00:00

Eu não sei o que exatamente está acontecendo porém quando eu tento rodar essa aplicação no linux, vai tranquilamente, mas quando eu tento usar o visual studio no windows eu recebo esse erro: Erro o SDK 'Microsoft.NET.Sdk.Web' especificado não pôde ser encontrado. Já tentei configurar variavel de ambiente, reinstalar o visual studio, reinstalar o .net e nada. Repositório do código: https://github.com/karlgama/filmesapi-c
dotnet --info:

  Architecture: x86
  Commit:       bf5e279d92
  RID:          win-x86

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.26 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.16 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.26 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.16 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]


é uma api bem besta que estou fazendo pra aprender .net e C# mesmo mas estou apanhando muito pra esse erro, mesmo em fóruns,git e stack overvflow as soluções sugeridas como configurar variavel de ambiente não resolveu.

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2024-01-19T05:44:21.1033333+00:00

    Hi @kaique silva ,

    Is your project targeting x64 or x86?

    Try installing the appropriate version of the .NET SDK.

    Best Regards.

    Jiachen Li


    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.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2024-01-18T06:13:40.79+00:00

    Hi @kaique silva ,

    Try to set the MSBuildSDKsPath's value to C:\Program Files\dotnet\sdk .

    Best Regards.

    Jiachen Li

    ---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.

    1 person found this answer helpful.

  2. Esron Teixeira Costa 0 Reputation points
    2024-10-24T12:22:59.0533333+00:00
    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.