PROJECT WONT RETARGET SDK VERSION AND CANT DETECT SDK

gavin 20 Reputation points
2024-12-18T05:36:36.5833333+00:00

I HAVE TRIED EVERYTHING TO FIX THIS ISSUE, I AM UNABLE TO BUILD C++ PROJECTS EVERYTIME I GET THE SAME ERROR :
"The Windows SDK version 10.0.20348.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting Retarget solution"

I TRIED RETARGETTING IT AND CHANGING IT IN THE PROJECT PROPERTIES NOTHING WILL FIX IT EVEN IF ITS A DIFFERENT SDK VERSION IT WILL THROW THE SAME ERROR ABOUT VERSION 10.0.20348.0 WHEN ITS NOT EVEN THE SELECETED SDK. I HAVE TRIED REINSTALLING VISUAL STUDIO A TOTAL OF 50 TIMES AND ALSO REINSTALLING THE SDKS ASWELL AS DOWNLOAD OTHER SDK VERSION I AM ABLE TO COMPILE .NET PROJECT NO PROBLEM BUT IT SEEMS NO MATTER WHAT I DO IT DOESNT WANT ME COMPILING CPP PROJECTS AND HAVE NOT FOUND A CLEAR SOLUTION ONLINE EITHER. IF YOU KNOW A SOLUTION TO THIS ISSUE IT WOULD BE GREATLY APPRECIATED BECAUSE THIS IS VERY FRUSTRATING.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,307 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,806 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,067 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 31,956 Reputation points Microsoft Vendor
    2024-12-18T08:16:20.9566667+00:00

    Hello @gavin,

    Welcome to Microsoft Q&A forum.

    I HAVE TRIED REINSTALLING VISUAL STUDIO A TOTAL OF 50 TIMES AND ALSO REINSTALLING THE SDKS ASWELL AS DOWNLOAD OTHER SDK VERSION.

    I think you have installed the Windows SDKs correctly. The issue might be that VS fails to detect the installed Windows SDKs.

    Please firstly check and confirm that the Windows SDK folder named "10.0.20348.0" exists under C:\Program Files (x86)\Windows Kits\10\Include.

    User's image

    Then try following:

    1. Open Control Panel, find the installed "Windows Software Development Kit - Windows 10.0.20348.X", right-click it, select Change, choose Repair to repair it (you can also try to uninstall it and then reinstall Windows SDK manually). Check if VS detects it.
    2. Install a previous version of Visual Studio with Windows 10.0.20348.0 selected. For example, I assume you are using VS 2022, install VS Professional 2019(close VS and VS Installer, run the VS Professional 2019 setup file, when VS Installer pops up automatically, switch to "Individual components" tab and search, select "Windows 10 SDK (10.0.20348.0)" option, install it). After you install VS Professional 2019, no need to start VS 2019, start VS 2022(I assume you are using VS 2022), create a new C++ project, check if the Windows SDK can be detected correctly. User's image

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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 additional answers

Sort by: Most helpful

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.