error You must have the .NET Core SDK installed to perform this operation. See here for supported versions.

VASQUEZ PORTILLO MARTHA LILIAN 5 Reputation points
2024-01-16T21:24:08.19+00:00

I have installed the requirements for the exercise 'Create an Azure Function by using Visual Studio Code' as instructed, but when I try to create the function, I encounter the error 'You must have the .NET Core SDK installed to perform this operation. See here for supported versions.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,398 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,096 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Michael Taylor 56,861 Reputation points
    2024-01-16T22:17:41.66+00:00

    It would be useful if you could provide us a link to the instructions that you are following as there are several pages that you could be mentioning. Even better would be to clarify exactly what you installed...

    VS Code is a 64-bit app. Therefore you need to install the x64 version of the SDK, not the x86 version. A quick way to determine what you installed is to go to a Powershell prompt (ensure you're using x64 version) and type dotnet --list-sdks. That will show a list of SDKs that are installed.

    1 person found this answer helpful.

  2. VASQUEZ PORTILLO MARTHA LILIAN 5 Reputation points
    2024-01-17T20:44:54+00:00

    The requirements I'm installing are from this link: https://learn.microsoft.com/en-us/training/modules/develop-azure-functions/5-create-function-visual-studio-code The version of Visual Studio Code is this one, and I'm following the instructions from the download site: VSCodeUserSetup-x64-1.85.1.exe The SDK version is this one, I install it following the instructions from the download site: dotnet-sdk-8.0.101-win-x64.exe V4 func-cli-x64.msi PowerShell-7.4.1-win-x64.msi After the installations, the SDK directory path appears in the environment variables. When I run dotnet --list-sdks, I get the version of the SDK I installed, but when I try to create a project, I still get the error "You must have the .NET Core SDK installed to perform this operation. See here for supported versions."


  3. Rohan Nikam 0 Reputation points
    2024-01-17T22:49:48.4233333+00:00

    Install or Update .NET Core SDK:

    • Make sure you have the .NET Core SDK installed on your machine. You can download it from the official .NET website: Download .NET SDK

    Verify Installed Version: - After installing the SDK, verify that the correct version is installed. Open a command prompt or terminal and run the following command to check the installed SDK version:

          cssCopy code
          dotnet --version
          
          ```
    
          **Ensure PATH Environment Variable is Set:**
             - Ensure that the directory containing the **`dotnet`** executable is included in your system's PATH environment variable. This allows you to run **`dotnet`** commands from any location in the command prompt or terminal.
    
             **Restart the Command Prompt or Terminal:**
                - If you installed or updated the .NET SDK after opening the command prompt or terminal, close and reopen it to ensure that the changes take effect.
    
                **Check Project Requirements:**
                   - If you are working within a specific project, check the project's requirements and make sure it is configured to use a supported version of the .NET SDK. You can check the **`global.json`** file or project configuration for the required SDK version.
    
                   **Visual Studio Users:**
                      - If you are using Visual Studio, make sure you have the appropriate workload and components installed. You can check and modify your Visual Studio installation through the Visual Studio Installer.
    
    **Update or Repair .NET SDK:**
       - If you already have an older version of the SDK installed, consider updating it to the latest version. Alternatively, you can repair the installation using the installer.
    
    
    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.