Garrick
Garrick

Reputation: 312

Set default Platform Toolkit to Windows7.1SDK in Visual Studio 2010?

In visual Studio 2010, how do I set the 'Platform Toolkit' to 'Windows7.1SDK' as a global DEFAULT for all Solutions/Projects opened? I'm working with an SDK that has numerous Solutions, one for each sample project. This setting has to be updated for each Solution the first time I build it. I'd rather configure this once. The following links do not seem to answer this question as they focus on changing it for a single project/solution.

Switching VS2010 to use Windows 7.1 SDK

http://msdn.microsoft.com/en-us/library/ff660764.aspx

Note the MSDN instructions aren't even correct. It seem syou have to right-click on the Project-Node, not the Solution-Node. It's been suggested one could multi-select all the projects in a single Solution, however I have numerous VS-Solutions.

(MSDN)

  1. In Visual Studio 2010, open a solution (.sln) file or create a solution.
  2. In Solution Explorer, right-click the solution node and then click Properties.
  3. In the Configuration list, select All Configurations. Under Configuration Properties, select General.
  4. As the Platform Toolset option, select Windows7.1SDK. Click OK.

Upvotes: 1

Views: 2279

Answers (2)

kemuri9
kemuri9

Reputation: 11

I just had to do this for sharing a project between developers where some have MSVS 2010 Pro and some only have Express.

I found that it was possible to do this by actually modifying .props files for MSBuild platforms.

In the file C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.default.props there are lines

    <PlatformToolset Condition="'$(PlatformToolset)' == ''">$(DefaultWin32PlatformToolset)</PlatformToolset>
    <PlatformToolset Condition="'$(PlatformToolset)' == ''">v100</PlatformToolset>

I replaced these with the following line

    <PlatformToolset Condition="'$(PlatformToolset)' == ''">Windows7.1SDK</PlatformToolset>

And now Visual Studio 2010 defaults to using the Windows7.1SDK as the platform toolset for Win32 projects.

There are similar files for the Itanium and x64 architectures respectively at

  • C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Itanium\Microsoft.Cpp.Itanium.default.props
  • C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.default.props

Which I also altered and saw successful results.

I've only suggested that the developers with Express to do this though, since only in Express is the "v100" platform toolset particularly lacking.

Note: I've not particularly tested to see what affect this will have on other installed versions of Visual Studio.

Upvotes: 1

Yoonian
Yoonian

Reputation: 567

Just modify Windows SDK configuration registry like below. I hope it will be helpful.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows]
"CurrentVersion"="7.1.7600.0.30514"
"CurrentInstallFolder"="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"

Upvotes: 1

Related Questions