This article describes what you need to do to build Win32 applications using Visual C++ Express and the Windows SDK for Windows Server 2008 and .NET Framework 3.5. A more detailed explanation including screenshots can be found here. With the Visual Studio 2008 Express versions you can build Win32 applications right out of the box. You no longer have to manually integrate the Windows SDK content with VC++ Express.
A serious bug has been discovered with the Windows SDK Configuration Tool. This bug is not apparent as the tool appears to work correctly. Please read the blog post WinSDK bug notification: SDK Config Tool appears to work but fails, to learn more about the issue and find workaround steps.
The Visual Studio 2008 editions are seamlessly integrated with the Windows SDK. VS2008 editions include the same Vista RTM headers and libraries that shipped in the Microsoft Windows Software Development Kit Update for Windows Vista released in March, 2007. The SDK tools included with VS2008 editions are more recent than those that ship in the Vista Update SDK and the Windows Server 2003 Platform SDK.
If you install another SDK, such as the Windows SDK for Windows Server 2008 and .NET Framework 3.5 after you install VS, you are ready to develop with the headers, libraries and tools in the SDK for Windows Server 2008. Read on if you installed the SDK before installing Visual Studio. (It’s easy to switch back if you want.)
You’re done. After installing the Server 2008 SDK, the registry key is set to point to the new Server 2008 SDK (v6.1) content. If you installed the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories. If you want to switch back to the default (Vista v6.0A) headers and libraries that were installed with VS 2008, you should use the new SDK Configuration Tool to select the v6.0A SDK content.
The Windows SDK for Windows Server 2008 includes a new SDK Configuration Tool that sets the Visual Studio include, library and tools directories for you. This tool allows you to switch quickly between the headers, libraries and tools in the installed Windows SDK(s) and those that are embedded in Visual Studio. If you install the Windows Server 2008 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set the directories manually.
The SDK Configuration Tool has a GUI interface but it works only on the Visual Studio Retail (non-Express) SKUs. (This is scheduled be fixed in the next release.) You will use the SDK Configuration tool at the command line with VC++ Express.
1. Launch the Windows SDK Command Window (Start, All Programs, Microsoft Windows SDK v6.1, Command Window)
2. CD to \Program Files\Microsoft\Windows\v6.1\Setup>
3. Type: WindowsSdkVer.exe -version:v6.1
This command will set the Windows SDK for Windows Server 2008 (v 6.1) as the “current” SDK for Visual Studio to use for headers, libraries and tools. Use ‘-version:v6.1’ for the Windows Server 2008 SDK content. Use ‘-version:v6.0A’ for the Visual Studio 2008 content.
Step 4: Validate that the directories were updated.
How to switch directories back to the SDK content that shipped ‘in the box’ with VC++ 2008 Express
Use the SDK Configuration Tool at the command line to make v6.0A the current version.
You can also read the blog post Integrating Windows SDK and VS with new SDK Configuration tool for more information on the Windows SDK Configuration tool. This article describes the use of the Windows SDK Configuration tool, including how it works.