Share via

Change default Windows SDK and Platform Toolset

Max Yaffe 40 Reputation points
2026-03-03T17:29:12.6533333+00:00

I have a multi-project solution built in Visual Studio 2022. I'd like to set the default Windows SDK Version explicitly so all projects use the same library. However, it seems like I have to change it in each library, explicitly.

Can this setting be put into a shared props file that all my projects inherit? Or is there a place where it can be configured explicitly?

Developer technologies | C++
Developer technologies | 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.

0 comments No comments
{count} votes

Answer accepted by question author
  1. Jay Pham (WICLOUD CORPORATION) 3,505 Reputation points Microsoft External Staff Moderator
    2026-03-04T04:14:40.12+00:00

    Hello @Max Yaffe ,

    As RLWA32 mentioned, the AI's solution with Directory.Build.props won't work if your individual .vcxproj files already have the SDK or Toolset hardcoded.

    To fix this, you need to right-click on each individual C++ project in the Solution Explorer and open their Property Pages. If the Windows SDK Version or Platform Toolset values appear in bold, they are currently overriding the global settings. You must clear those values (or select <inherit from parent or project defaults>).

    Once the bold formatting is removed from all projects individually, they will correctly inherit the unified values from your root Directory.Build.props file.
    User's image

    If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide provide feedback. Thank you. 

    1 person found this answer helpful.

Answer accepted by question author
  1. Q&A Assist
    2026-03-03T17:29:22.88+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Yes. The Windows SDK version and Platform Toolset can be centralized in shared MSBuild props so all projects inherit the same values.

    A common approach is to use a Directory.Build.props file placed at the solution root. MSBuild automatically imports this file for all projects under that directory, so properties defined there apply to every project unless overridden in the individual .vcxproj.

    For example, create Directory.Build.props next to the solution file with content similar to:

    <Project>
      <PropertyGroup>
        <!-- Shared Windows SDK version -->
        <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
    
        <!-- Shared Platform Toolset (for example, v143 for VS 2022) -->
        <PlatformToolset>v143</PlatformToolset>
      </PropertyGroup>
    </Project>
    

    All C++ projects under that folder will then use the same WindowsTargetPlatformVersion and PlatformToolset, unless a project explicitly overrides them in its own .vcxproj.

    The same mechanism is used in the GDK documentation to override MSBuild properties globally via Directory.Build.props for things like PlatformToolset, Windows SDK paths, and Visual Studio–specific overrides.


    References:


0 additional answers

Sort by: Most helpful

Your answer

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