Release Notes for Windows® Software Development Kit (SDK) for Windows 7 and .NET Framework 3.5 Service Pack 1

License Agreement
Supported Compiler, Platforms, and Related Software
Installing, Uninstalling, and Using the Windows SDK
Known Issues
Windows SDK Product Support and Feedback

1.  Welcome

Welcome to the Microsoft Windows Software Development Kit (SDK) for Windows 7 and .NET Framework 3.5 Service Pack 1.

The Windows SDK contains a set of tools, code samples, documentation, compilers, headers, and libraries that developers can use to create applications that run on Microsoft Windows. You can use the Windows SDK to write applications using the native (Win32/COM) or managed (.NET Framework) programming model.

For access to additional resources and information, such as downloads, forum posts, and the Windows SDK team blog, go to the Windows SDK Developer Center.

1.1       Recommended Resources

This release of the Windows SDK does not include a .NET Framework Redistributable Package. Windows 7 includes .NET Framework 3.5 SP1. Windows Vista and Windows Server 2008 include .NET Framework 3.0.

Users running Windows Server 2003 and Windows XP must install the .NET Framework 3.0 or 3.5 SP1 to run and develop .NET Framework applications. Some samples and tools included in the Windows SDK also require you to install .NET Framework 3.5 SP1.

Along with content that ships in the Windows SDK, Microsoft offers additional free developer tools and resources that you might find helpful, including:

·    LUA Buglight™ is a tool to help both developers and IT professionals (sysadmins) identify the specific causes of admin-permissions issues (LUA bugs) in desktop applications running on Windows XP, Windows Server 2003, or Windows Vista. Once the specific causes have been identified, the bugs can more easily be resolved by fixing the app's source code, or by making configuration changes, allowing the app to work correctly for non-admin users.

·    Microsoft .NET Framework 3.5 SP1 is the latest update of the .NET Framework, and contains many new features that are compatible with both .NET Framework 2.0 and .NET Framework 3.0. The .NET Framework 3.5 SP1 includes several fixes for .NET Framework 2.0 3.0, and 3.5.

·    Microsoft DirectX SDK Developer Center provides links to the resources needed to build cutting-edge, media-rich, interactive applications. It includes runtimes, headers and libraries, samples, documentation, utilities, and support for C++ development.

·    Microsoft Visual Studio Express is a set of free, lightweight and easy-to-use tools for the hobbyist, novice, and student developer.

·    Microsoft Windows PowerShell™ command-line shell and scripting language helps IT Professionals achieve greater productivity. Using a new admin-focused scripting language, more than 130 standard command-line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation. More information on Windows PowerShell is available from the PowerShell Team Blog and the Windows PowerShell Technology Center.

·    Windows Developer Center is the official site about development for Windows Client platforms, including Windows 7 and earlier operating systems. The Developer Center includes links to the Windows 7 Developer Guide and many other resources.

·    Windows SDK Developer Center is the official site about development using the Windows SDK and provides information about the SDKs and links to the Windows SDK Blog, Forum, online release notes and other resources.

·    The Application Compatibility Toolkit (ACT) enables IT professionals, software developers and independent software vendors (ISVs) who work in a corporate environment to determine, before deployment within the organization, whether their applications are compatible with a new version of the Windows® operating system. ACT also enables such individuals to determine what impact the periodically published Windows Updates will have on their applications. ACT users can then use testing and mitigation tools contained in the toolkit to fix many of these compatibility issues.

·    The Microsoft .NET Compact Framework is a key part of realizing Microsoft's goal to provide customers with great experiences any time, any place, and on any device. The .NET Compact Framework's managed code and XML Web services enable the development of secure, downloadable applications on devices such as personal digital assistants (PDAs), mobile phones, and set-top boxes.

2.  License Agreement

The contents included in the Windows SDK are licensed to you, the end user. Your use of the SDK is subject to the terms of an End User License Agreement (EULA) accompanying the SDK and located in the \License subdirectory. You must read and accept the terms of the EULA before you access or use the SDK. If you do not agree to the terms of the EULA, you are not authorized to use the SDK.

3.  Supported Compiler, Platforms, and Related Software

This release of the Windows SDK supports Microsoft Visual Studio 2005 SP1, Microsoft Visual Studio 2008 SP1, and the Microsoft Visual Studio 2008 Express Editions. Express Editions of Visual Studio are available to download from the Visual Studio Express site free of charge.

This release of the Windows SDK supports x86, x64, and IA64 platform architectures for building and running applications on Windows XP SP3, Windows Server 2003 R2, Windows Vista, Windows Server 2008, and Windows 7.

4.  Installing, Uninstalling, and Using the Windows SDK

To optimize your Windows SDK setup experience, we strongly recommend that you install the latest updates and patches from Microsoft Update before you begin installing the Windows SDK.

4.1       Installation and Related Content

We recommend that the Windows SDK be installed on a clean computer or completely uninstall any pre-releases of the .NET Framework, the Platform SDK, the Windows SDK and their dependencies before installing this release. These older pre-release components might interfere with this release, causing setup to fail or break functionality.

You might see more than one Windows SDK product listed in the Upgrade Options screen during SDK installation. See Section 4.2 for information on uninstalling SDK components.

These release notes use <install folder> to refer to the installation folder for the Windows SDK. By default, this folder is C:\Program Files\Microsoft SDKs\Windows\v7.0.

4.1.1            Windows SDK Disk Space Requirements

The complete DVD ISO installation of the Windows SDK requires 1.4 GB or more disk space to install successfully. Please verify that the computer you are installing to has at least the minimum required disk space before beginning setup. If the minimum required disk space is not available, setup will return a fatal error.

4.1.2            How to Install the Windows SDK

This version of the Windows SDK is available as a DVD ISO image. To install it:

1.    Burn the ISO to DVD media or mount it on a virtual drive. From that ISO, double-click setup.exe to begin the SDK setup

2.    Follow the instructions in the Windows SDK Setup wizard

4.1.3            Windows SDK Start Menu Shortcuts

Access the Windows SDK shortcuts through the Start menu (Start, All Programs, Microsoft Windows SDK). The Start menu folder contains shortcuts to:

·         The SDK build environment command window

·         Windows SDK Release Notes

·         Windows SDK documentation

·         Samples Reference

·         Tools

·         Windows SDK Configuration Tool (located under Visual Studio Registration)

4.1.4            Optional Related Content

If you intend to use .NET Framework components, install .NET Framework 3.5 SP1 from the Microsoft Download Center.

If you intend to use Microsoft Visual Studio 2005, install Microsoft Visual Studio 2005 SP1 and Visual Studio 2005 Extensions for .NET Framework 3.0 from the Microsoft Download Center.

Note: If you intend to use Visual Studio 2005 to develop .NET Framework applications, you must install the Windows SDK before installing the Visual Studio 2005 Extensions for .NET Framework 3.0.

If you intend to use Microsoft Visual Studio 2008, check for updates at the Windows Server 2008 Developer Center.

Note: Visual Studio 2008 Extensions for .NET Framework 3.0 are included with Visual Studio 2008.

4.2       How to Uninstall SDK Components

When you uninstall the SDK through Programs and Features (Add/Remove Programs on pre-Vista OS's) most of the SDK components will be uninstalled automatically. However, a few shared components installed by the SDK may need to be uninstalled separately. This guide provides instructions for uninstalling those shared components.

To uninstall shared SDK components:

1.    From the Start Menu, go to Control Panel, Programs and Features (Add/Remove Programs on pre-Vista OS's)

2.    Select and remove the following entry:

·    Microsoft Windows SDK for Windows 7 (the Windows SDK core-component files)

3.    Remove the shared components. This list provides some of the components you may see. If you are running a 64 bit version of Windows you may see both 32 bit (x86) and 64 bit (x64, IA-64) versions of the components listed:

·    Application Verifier

·    Debugging Tools for Windows

·    Microsoft FxCop 1.36

·    Microsoft Document Explorer 2008

·    Microsoft Visual C++ 2008 Redistributable

·    Microsoft Visual C++ 2008 Standard Edition

4.3       Win32 C++ Development with the Windows SDK and Microsoft Visual Studio

In order to utilize Windows SDK headers, libraries, and tools within Microsoft Visual Studio, the SDK-provided Windows SDK Configuration Tool must be run. The Windows SDK Configuration Tool must be run for each user on Windows Vista or later.  You can build Win32 applications right out of the box with the Vista SDK components that are embedded in Visual Studio 2008 (Windows headers and libraries, tools and reference assemblies).  You can switch to the more recent components that ship with the Windows SDK for Windows 7 by using the Windows SDK Configuration Tool.  If you installed the Windows 7 SDK before you install Visual Studio, you will need to use the SDK Configuration Tool to set Visual Studio directories back to the Windows 7 SDK content. To run the Windows SDK Configuration Tool, go to Start > All Programs > Microsoft Windows SDK v7.0 > Visual Studio Registration > Windows SDK Configuration Tool.

4.4       Building Samples

When building Samples, do so in a directory outside C:\Program Files to which you have write access. The SDK build environment supports building samples from makefiles, Visual Studio project files or Visual Studio solution files.  To build from the command line:

1.    Copy the sample to a working folder not under C:\Program Files. Copying to a location other than C:\Program Files makes it possible to maintain a pristine copy of the SDK samples and avoid issues when writing to files and directories located under C:\Program Files.

2.    Open the Windows SDK CMD shell (Start > All Programs > Microsoft Windows SDK v7.0, CMD Shell).

3.    Build the sample from the command line as follows:

·         Build a makefile by typing nmake

·         Build a .csproj file by typing msbuild *.csproj /p:platform=[ win32 | X64 | IA64]

·         Build a .vbproj file by typing msbuild *.vbproj /p:platform=[ win32 | X64 | IA64]

·         Build a .sln file by typing msbuild *.sln /p:platform=[ win32 | X64 | IA64]

·         Build a .vcproj by typing vcbuild *.vcproj /platform=[ win32 | X64 | IA64 ]

When building with MSBUILD, you should specify a target platform.  If a project is configured to build for several different platform types and if you don't specify which platform you wish to build for, the first platform listed in the solution or project file will be built.  Configurations are listed in alphabetical order by Visual Studio, so ‘Itanium’ may be the first configuration listed.

If you want to build an application configured for an X86 machine, specify ‘win32’:

msbuild mysample.vbproj /p:platform=win32

If you want to build an application configured for an X64 machine, specify ‘X64’:

msbuild mysample.vbproj /p:platform=X64

4.4.1            Building .NET Framework Samples

Samples demonstrating .NET Framework 3.0 and 3.5 SP1 can be found individually in the SDK documentation. Each sample has its own description page. From each sample page, you can view the source files for those samples as well as individually download all the files of that sample to a chosen location. The .NET Framework samples can be accessed in bulk by directly opening the sample .zip files located in <install folder>\Samples.

4.4.2            Setting Build Environment Switches

To set the build environment, use the setenv.cmd tool within a debug cmd shell by following the steps below..

1.            Launch the Windows SDK build environment. From the Start menu, click on  All Programs > Microsoft Windows SDK v7.0 > CMD Shell.

2.            Set the build environment. At the prompt, type:
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" [/target]

The list of available targets is shown below.

Usage: "Setenv [/Debug | /Release][/x86 | /x64 | /ia64][/vista | /xp | /2003 | / 2008 /win7 ] [-h or /?]"
/Debug   - Create a Debug configuration build environment
/Release - Create a Release configuration build environment
/x86     - Create 32-bit x86 applications
/x64     - Create 64-bit x64 applications
/ia64    - Create 64-bit IA64 applications
/vista   - Windows Vista applications
/xp      - Create Windows XP SP2 applications
/2003    - Create Windows Server 2003 applications
/2008    - Create Windows Server 2008 or Windows Vista SP1 applications
/win7    - Create Windows 7 applications

4.5       File System Layout

By default, the Windows SDK is installed to your local disk in the locations below. The default installation path for most components of this SDK is C:\Program Files\Microsoft SDKs\Windows\v7.0.

The default installation path for the Visual C++ compilers is a different location. On an x86 computer, the default installation path of the Visual C++ compilers is C:\Program Files\Microsoft Visual Studio 9.0\VC. On an x64 or IA64 computer, the default installation path of the Visual C++ compilers is C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC.




Windows SDK tools


Windows SDK documentation


Windows SDK headers


Import libraries and TLB files


Windows SDK license information


Redistributable files


Windows SDK samples


Setup files

4.6       Development with the DirectX SDK when Visual Studio is installed.

In order to utilize DirectX SDK resources you should ensure that the DirectX SDK include, library, and executables directories are set correctly in Visual Studio 2008. The order in which Visual Studio 2008 looks for executable directories and library files is important. The Windows SDK directories should appear above the DirectX SDK directories.

1.    Launch Visual Studio 2008.

2.    Open the Tools menu and select Options…. The Options dialog box appears.

3.    In the left pane of the Options dialog box, expand the Projects and Solutions node.

4.    Under Project and Solutions, select VC++ Directories.

5.    In the right pane, set the "Platform" drop-down list box to Win32® and the "Show directories for" drop-down list box to "Executable" files.

6.    At the bottom of the list of executable file directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Utilities\bin\x86 (If there is already such an entry, move it to the bottom of the list.)

7.    Set the "Show directories for" drop-down list box to "Include" files.

8.    At the bottom of the list of directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Include (If there is already such an entry, move it to the bottom of the list.)

9.    Set the "Show directories for" drop-down list box to "Library" files.

10.    At the bottom of the list of directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Lib (If there is already such an entry, move it to the bottom of the list.)

11.    11. If you are developing an application to run on AMD64, you should repeat these steps to set the AMD64 paths by setting the "Platform" drop-down list box to AMD64 and providing the appropriate paths.

12.    Click OK.

5.  Known Issues

This release of the Windows SDK has the following known issues, categorized by type:

Build Environment
SDK Tools and Compilers
Headers and Libraries

5.1       Build Environment

5.1.1            MSBuild May Report a Dependency on the Microsoft .NET Framework SDK 2.0

The Windows SDK does not set the HKLM\Software\Microsoft\.NETFramework\sdkInstall Rootv2.0 registry key to a string value containing the root directory of the Windows SDK installation. Some MSBuild tasks might expect this registry key to be set. If you already have .NET Framework SDK 2.0 or Microsoft Visual Studio 2005, this key will be set, and you should not encounter a problem. However, if you install the Windows SDK without either the .NET Framework SDK or Microsoft Visual Studio 2005, you might receive an error message from MSBuild tasks with a dependency on this key. To workaround this issue set the string value of this key to the root directory of the Windows SDK installation. By default, this directory is C:\Program Files\Microsoft SDKs\Windows\v7.0

Additionally, in order to use AL.exe, the ALToolPath parameter must be set and passed to msbuild (see more in section 5.4.11).

5.1.2            SDK Build Environment may Fail on X86 XP with VS2005

If your usage scenario matches the one listed below, you will be unable to build in the Windows SDK command line build environment.  If you type cl.exe in the SDK command window and press Enter, you will see this error:

This application has failed to start because mspdb80.dll was not found.  Re-installing the application may fix this problem.

Computer setup required to repro issue:

1.           Windows XP on x86 machine (which has version 5.1.2600.2180 of REG.exe)

2.           Visual Studio 2005 installed, but Visual Studio 2008 is NOT installed

Cause: When the SDK build environment window is launched, the SDK file SetEnv.cmd launches Reg.exe.  Reg.exe generates standard output when a valid KeyPath is specified and also generates error output when invalid Value is specified.  In this scenario, the KeyPath is valid but the value doesn’t exist.  For more information, see the Windows SDK blog post on this issue.

Workaround: follow these instructions to manually edit SetEnv.cmd to remove the second call to REG:

1.    Open C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd in Notepad or another editor

2.    For this line:
FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "%VSRegKeyPath%" /v 9.0') DO SET VSRoot=%%B

Either comment out using the REM command (like this):
REM FOR /F "tokens=2* delims=     " %%A IN ('REG QUERY "%VSRegKeyPath%" /v 9.0') DO SET VSRoot=%%B

OR delete the line completely.

3.    Save SetEnv.cmd

4.    Restart the Windows SDK command prompt

5.1.3            Microsoft Visual Studio 2005 or 2008 is Required for .NET Compact Framework Development

The SDK provides documentation and sample code that targets .NET Compact Framework. However, actual development of .NET Compact Framework applications requires Microsoft Visual Studio 2005 or Visual Studio 2008. When building a sample that depends on .NET Compact Framework, you might see this error:

C:\Sample\Foo.csproj(57,11): error MSB4019: The imported project "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Microsoft.CompactFramework.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

To workaround this issue, install either Microsoft Visual Studio 2005 or Microsoft Visual Studio 2008, or download and install the .NET Framework 2.0 SDK.

5.1.4            Running a Partial Installation of the Windows SDK Might Change File Link Paths to Point to Nonexistent Files

If you have Microsoft Visual Studio 2008 installed and then install the Windows SDK, an important registry key is changed. This key points to the SDK tools as well as to Windows Headers and Libraries. However, if you run a custom installation of the Windows SDK that does not include either tools or Headers and Libraries, the link to those files will be broken, and your projects will fail to compile with an error like this one:

LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

To fix this issue, either repair Microsoft Visual Studio 2008 to restore it to its original state or install the tools, headers and libraries from the SDK.

5.1.5            Windows 7 SDK with Visual C++ 2005: Failure to compile in Debug mode.

If your usage scenario matches the one listed below, you will be unable to debug in the Windows SDK command line build environment or Visual Studio 2005 SP1.

Symptom: You have an .lib file or an .obj file that exposes C interfaces that was built by using Microsoft Visual C++ 2008 or for Windows 7. You add this file to a project as a link dependency. When you build the project in Microsoft Visual Studio 2005 Service Pack 1 (SP1) to generate an .exe file or a .dll file, you may receive the following link error:

Fatal error LNK1103: debugging information corrupt

Cause: This problem occurs because of a compatibility issue between Visual Studio 2005 and Visual Studio 2008 versions. For more information, see the Microsoft Support page for the patch:

Fix: Install the patch for Visual Studio 2005 SP1 available from:

5.1.6            Windows SDK Configuration Tool does not update Visual Studio 2008 paths for IA64 headers and libraries.

When the Windows SDK Configuration Tool is used to integrate the Windows 7 SDK with Visual Studio 2008, the VC++ Directories for headers and libraries are set to point to the Windows 7 SDK content for x86 and x64 platforms only. Visual Studio will still point to the IA64 headers, libraries and tools that ship with Visual Studio 2008.

To resolve this issue, from Visual Studio 2008, select Tools - Options - Projects and Solutions - C++ Directories. From the ‘Platform’ drop-down, select ‘Itanium’ and from the “Show directories for” drop-down select ‘Include files’. Replace all instances of ‘WindowsSDKDirIA64’ with ‘WindowsSDKDir’. Select ‘Library files’ from the “Show directories for” drop down menu and repeat the previous step.

5.1.7            SDK Configuration Tool displays error stating Visual Studio is missing if OS language format is not set to English.

When the Windows SDK Configuration Tool is run on a system which has Windows 7, Visual Studio 2008, and the Windows 7 SDK installed, and the language format of the operating system is not set to English, the following error message may appear. “Your system does not have Visual Studio 2005 or Visual Studio 2008 installed."

There are two ways to workaround the problem:

1) Use the command-line version of the tool. Open a Windows SDK command prompt window by selecting Programs -> Microsoft Windows SDK -> CMD shell. At the Windows SDK command prompt type the following command: WindowsSdkVer.exe -version:v7.0

 Please note that the above workaround is only valid for retail SKU's of Visual Studio 2008.

2) Change the OS Language format to English. To do that go to Control Panel -> Regional and Language Options -> Click Formats tab -> Select "English (United States)" as Current Format.

5.2       Documentation

5.2.1            Documentation on the Windows Vista Game Explorer is not Included in the Windows SDK

Game Explorer provides an easy, customizable way to present your game to users of Windows. Documentation on using Game Explorer is not included with the Windows SDK. To view this content, visit the MSDN Online Library.

5.2.2            When launching Windows SDK Documentation for the first time, user may see a Microsoft Document Explorer error message.

Issue: When launching Windows SDK Documentation for the first time, user may see the Microsoft Document Explorer error message: The Application Data folder for Microsoft Document Explorer could not be created.

Cause: On first launch, Microsoft Document Explorer needs to create one or more files in the Application Data folder. The application needs to run in elevated mode in order to write to this directory.

Workaround: Run the application as an administrator. Under Start Menu, go to All Programs and expand Microsoft Windows SDK v7.0. Right-click on Windows SDK Documentation and select Run As Administrator. Provide administrator credentials, if required. This only has to be done on first launch. Subsequent use of Microsoft Document Explorer can be accomplished by a standard user.

5.3       SDK Tools and Compilers

5.3.1            Tools Removed from this Release

The following tools were included in the Windows SDK for Server 2008 and .NET Framework 3.5 release, but are not included in this release:

·         capicom.dll

·         iacom.dll

·         ialoader.dll

·         msistuff.exe

·         perflibmig.exe

·         permcalc.exe

·         secutil.exe

·         windowssideshowvirtualdevice.exe (replaced by DeviceSimulatorforWindowsSideShow.msi)

·         wpfperf.msi (now included in the Windows Performance Toolkit suite)

·         xamlpad.exe

5.3.2            Some Tools Require .NET Framework 3.5 SP1

In order to function correctly some tools included in the Windows SDK also require you to install .NET Framework 3.5 SP1.

5.3.3            The Command-Line Environment for the Windows SDK Configuration Tool Supports Only Visual Studio 2008

The command-line environment for The Windows SDK Version Selection tool supports only Visual Studio 2008. It does not support earlier versions of Visual Studio. See the Windows SDK Blog post about the Windows SDK Configuration Tool for more information about the tool and this issue.

5.3.4            MSIL Disassembler (ILDASM.EXE) Help does not display in Windows 7.

Help for the ILDASM tool does not display because it uses a help file format that is not natively supported in Windows 7.  Online documentation is available:

5.3.5            OLE-COM Object Viewer (OLEView.exe) – error message appears and some tool functions are unavailable if tool is not run for the first time with administrator permissions.

If the first run of the OLE-COM Object Viewer tool is not done with administrator permissions the following error message will appear:

DllRegisterServer in IVIEWERS.DLL failed. OLEViewer will operate correctly without this DLL, however you will not be able to use the interface viewers.

To avoid this issue use “Run as administrator” when you run the tool for the first time.

5.3.6            FXCop setup is now under the SDK's Bin directory.

The installer for FXCop, fxcopsetup.exe, is now located in [Program Files]\Microsoft SDKs\Windows\v7.0\Bin\FXCop.

5.3.7            Global Assembly Cache for x64 platform contains only x64 version of mscorcfg.dll

The Windows SDK publishes mscorcfg.dll to the Global Assembly Cache (GAC) during setup to support the tools and development environment shipped in the SDK. For each x86, x64 and ia64 platform, the corresponding mscorcfg.dll is published to the GAC. For example, on the x64 platform, only the x64 version of mscorcfg.dll is published. As an x86 tool can be run on the x64 platform, this behavior may cause problems for some tools - a tool dependent on the x86 version of mscorcfg.dll will fail to run. For SvcConfigEditor.exe, the user can only use the x64 version on the x64 platform.

5.3.8            GuidGen.exe may fail to run without Visual Studio Installed.

The GuidGen.exe tool has a dependency on version 9.0 of the MFC Runtime. If you do not have the correct version installed you may see an error similar to this:

Activation context generation failed for "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\guidgen.exe". Dependent Assembly Microsoft.VC90.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

In order for the tool to function correctly we recommend installing any Visual Studio 2008 Express edition to obtain the required version of the MFC Runtime.

5.4       Samples

5.4.1            Some C++ Samples Require Upgrade Prior to Building

Many of the Win32 samples project and solution files must be upgraded prior to building in the SDK build environment or in Visual Studio 2008. The compilers in the SDK are Visual C++ v9.0 SP1, the same compilers that ship in Microsoft Visual Studio 2008 SP1. Many of the sample project files in the SDK are written for VC 8.0 compilers, the compilers that ship in Microsoft Visual Studio 2005. Samples with version 8.0 project files can be built in Microsoft Visual Studio 2005 but must be upgraded before being built in the Windows SDK build environment or in the Visual Studio 2008 or later build environments. When building a project file in the SDK Build environment, you might receive this error:

GramEvcbuild.exe : error VCBLD0010: Project 'foo.vcproj' requires upgrade.

Use 'vcbuild /upgrade' or 'devenv /upgrade' to upgrade the project.

To workaround this issue, follow the prompt in the command window and type vcbuild /upgrade or devenv /upgrade to upgrade the project.

The .NET Framework (managed) sample vcproject files cannot be upgraded using the workaround above. These must be upgraded using vcbuild /upgrade /overrideRefVer "SampleName.vcproj" because upgrade /overriderefver indicates that it will use .NET Framework 3.5.

5.4.2            Some C++ Samples will not Build in Visual Studio 2005

Some of the samples in the SDK contain v9.0 project files, which will not build in Visual Studio 2005. You cannot downgrade the project files to a lower version.  To workaround this issue, install Visual Studio 2008 (Express or Retail SKU) or build the sample in the Windows SDK command line build environment.

5.4.3            Some Samples have External Dependencies

Some samples included with the Windows SDK have dependencies on components outside the Windows SDK.               ATL/MFC Dependency

Some samples require the ATL and/or MFC headers, libraries, or runtime, which are included with Visual C++ (non-Express editions). When building a sample that depends on ATL/MFC without Visual Studio installed on your computer, you might see an error similar to this:

fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory

To workaround this issue, install a non-Express version of Microsoft Visual Studio 2008.               Windows Media Player Dependency

The Multimedia\WMP_11\dotNet\SchemaReader sample requires Windows Media Player 11 or later to be installed.               Microsoft Management Console 3.0 Dependency

The samples in the \Samples\SysMgmt\MMC3.0 directory require Microsoft Management Console 3.0 or later to be installed.               DirectX SDK Dependency

Some samples require the DirectX SDK (refer to the sample's readme for additional information).               msime.h Dependency

Some samples fail to build because the file msime.h is not found. Msime.h is not shipped with the Windows SDK. Msime.h is for use by developers when customizing applications for the 2007 Microsoft Office System.

The affected samples are:

·         winui\Input\tsf\TSFApps\ImmPad-Interim

·         winui\Input\tsf\TSFApps\ImmPad-Level3-Step3

·         winui\Input\tsf\TSFApps\TsfPad-Hybrid

To workaround this issue, download msime.h from the Microsoft Download Center and copy to the Windows SDK \Include directory.

5.4.4            Some Samples Require Microsoft Visual Studio 2005 and will not Build with Microsoft Visual Studio 2008

A few unmanaged samples rely on mspbase.h, mtyp.h, or mfc80ud.lib. These files are included with Microsoft Visual Studio 2005 and do not ship with Microsoft Visual Studio 2008.

1.    mspbase.h

a.    netds\Tapi\Tapi3\Cpp\Msp\MSPBase

b.    netds\Tapi\Tapi3\Cpp\Msp\Sample

c.    netds\Tapi\Tapi3\Cpp\pluggable

2.    mtype.h

a.    netds\Tapi\Tapi3\Cpp\tapirecv

b.    netds\Tapi\Tapi3\Cpp\tapisend

3.    mfc80ud.lib

a.    Sysmgmt\Wmi\VC\AdvClient

5.4.5            Some C++ Samples do not have Configurations for x64

When building a C++ sample on an x64 computer that does not have support for x64, you might see the following error message:

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

To workaround this issue, perform one of the following actions:

1.    Build the sample targeting x86 by using this command:

vcbuild *.vcproj /platform=win32

2.    Add x64 support by doing the following:

a.    Load the sample in Microsoft Visual Studio (C++).

b.    Update the Configuration Manager under Project | Properties.

For detailed instructions, see the Windows SDK Blog post "How to add 64-bit support to vcproj files."

Note: if you do not install libraries for all CPU architectures during SDK setup, some samples with Visual C++ project files might fail to build with this error for all configurations in the project file:

Fatal error LNK1181: cannot open input file

For example, if a sample has an x86 configuration and x86 libraries were not installed (these libraries are installed by default when installing the SDK on all platforms), the sample will fail to compile.

5.4.6            Visual J# Samples Require VJ++ (Visual Studio)

J# samples will not build using the Windows SDK because there is no appropriate build environment. This edition of the Windows SDK does not support building J# applications. To workaround this issue, install Visual Studio (VJ++) 2005.

5.4.7            Setupvroot.bat Setup Script for WCF Samples Fails on Windows Vista if the NetMsmqActivator Service is Enabled and Message Queuing (MSMQ) is not Installed

The Windows Communication Foundation samples setup script Setupvroot.bat does not work on Windows Vista if the NetMsmqActivator service is enabled and Message Queuing (MSMQ) is not installed. The iisreset utility does not work unless MSMQ is installed or the NetMsmqActivator service is disabled. The WCF samples setup script Setupvroot.bat will not run unless MSMQ is installed or the NetMsmqActivator service is disabled.

Make sure MSMQ is installed or disable the NetMsmqActivator service on Windows Vista before you run the WCF samples setup script Setupvroot.bat.

5.4.8            Some Samples Fail to Compile: Debug:Itanium Error

Some samples might fail to compile on all platforms with the following error:

vcbuild.exe: error VCBLD0004: Project 'C:\Samples\Technologies\DirectoryServices\BEREncoding\CP\BerEncoding\BerEncoding.vcproj' does not contain a configuration called 'Debug|Itanium'

This error occurs because platform configurations are listed alphabetically by default in a project or solution file created by Visual Studio. If Debug|Itanium is a supported configuration, it will be listed first in the samples' solution and/or project files. This configuration will be built first by default.

To workaround this issue, use a configuration switch to specify what platform you want to build for:

Msbuild *.sln /p:platform=Win32
Msbuild *.sln /p:platform=x64
VCbuild *.vcproj /platform:Win32
VCbuild *.vcproj /platform:x64

5.4.9            .NET Compact Framework Samples Require Visual Studio to Compile

.NET Compact Framework samples in the Windows SDK will not compile without .targets files installed on your local disk atC:\Windows\Microsoft.NET\Framework\<version>\Microsoft.CompactFramework.<language>.targets

To workaround this issue, install either Visual Studio 2005 or 2008 to install the .targets files.

The affected samples are:

·         CalculatorCS

·         CalculatorVB

·         MSMQSampleCS

·         RomanLegionCS

·         RomanLegionVB

·         SliderPuzzleCS

·         UltimateGmanCS

·         BubbleCS

·         BubbleVB

·         BankClientCS

·         POOMComInterop

·         DeviceNotification

·         RotatedTextCS

·         RotatedText

·         SqlCEResultSetSample

·         WebCrawlerCS

5.4.10         During the Build of a .NET Framework 3.0 or 3.5 Sample in the SDK Build Environment, Al.exe Might Not Be Found

When building a .NET Framework 3.0 or 3.5 sample in the SDK build environment, Al.exe is not found. (The ALTOOLPATH variable is set by Visual Studio 2005 to point to the .NET Framework 2.0 SDK, included with Visual Studio 2005.) You might receive this error:

Could not locate the .NET Framework SDK. The task is looking for the path t o the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1. ) Install the .NET Framework SDK. 2.) Manually set the above registry key to the correct location.

To workaround this issue, set the ALTOOLPATH environment variable to point to the version of Al.exe that ships in this Windows SDK. You can set ALTOOLPATH for an individual session using the Set command, or set the environment variable permanently at Start Control Panel System. On the Advanced tab, click the Environment Variables button. In the System variables area, click New. Add the variable name ALTOOLPATH with a Variable Value of one of the following:

·         For X86 computers: C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin

·         For x64 computers: C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64

·         For IA64 computers: C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\IA64

If you want to set the ALTOOLPATH for only the current session, use the following command:

On an X86 computer:

msbuild /p:ALToolPath="C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin

On an X64 or IA64 computer:

msbuild /p:ALToolPath="C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\X64

5.4.11         Windows Media Services SDK Plug-ins Fail to Build on Windows 2008 Server

The “Playlistparser” and “Authorization” plug-in samples should be available in Windows Media Services. The user should be able to enable and disable the newly built plug-ins. However, the “Playlistparser” and “Authorization” plug-ins fail to build and produce the following error:

Syntax error for the code given below in Unknwn.idl

   HRESULT QueryInterface(

        [in] REFIID riid,

        [out, iid_is(riid), annotation("__RPC__deref_out")] void **ppvObject);

To workaround this issue, build the “Playlistparser” and “Authorization” plug-ins on Windows Vista or Windows 2003 Server and copy the plug-ins to Windows 2008 Server.

5.4.12         Deselecting .NET Framework Documentation Feature During Setup may Prevent Managed Code Samples and Associated Documents from Installing Correctly

When installing the SDK, users are given the option of deselecting certain components. It is possible to deselect the Documentation/.NET Framework component, while leaving the Samples/.NET Framework/Samples in Documentation selected. When this specific combination is chosen, the .NET Framework Samples will fail to install correctly and an installation error will be generated in the SDK Installation Log. If a user attempts to correct this issue by running the Change wizard in Programs and Features (Add Remove Programs on pre-Vista operating systems), the .NET Framework Documents will install correctly but the samples will still be missing.

Workaround 1:

Access the .NET Framework samples directly opening the managed sample .zip files installed by default to \Program Files\Microsoft SDKs\Windows\7.0\Samples.

Workaround 2: Repair the SDK Installation

  1. Open Programs and Features (Add Remove Programs on pre-Vista operating systems)
  2. Select the Microsoft Windows SDK for Server 2008 and click Change
  3. In the Maintenance screen, select Change
  4. When presented with the Installation Options screen for setup, select the Documentation/.NET Framework component and click Next.
  5. Once SDK setup is complete, Repair the SDK installation by following these steps:
    1. Open Programs and Features (Add Remove Programs on pre-Vista operating systems)
    2. Select the Microsoft Windows SDK for Server 2008 and click Change
    3. In the Maintenance screen, select Repair

5.4.13         WSDAPI StockQuote and FileService samples may fail to build on the command line (using msbuild) if Visual Studio 2008 is installed

The WSDAPI StockQuote and FileService samples may fail to build on the command line (using msbuild) if Visual Studio 2008 is installed. These samples include project files which reference WSDL and XSD files, and msbuild attempts to invoke sproxy.exe to process these files. Visual Studio 2008 does not include sproxy.exe, and compilation fails if the tool is not present. Compiling from inside the Visual Studio IDE is unaffected.

It is not necessary to use sproxy to process these files. WsdCodeGen, a WSDL/XSD compiler for WSDAPI, can be used to generate C++ code from these files. This generated code is already included in the sample.

If you encounter this error, you can remove the XSD and WSDL files from the affected project files and recompile with msbuild:

·         StockQuote\StockQuoteContract\StockQuoteContract.vcproj: remove StockQuote.xsd, StockQuote.wsdl, and StockQuoteService.wsdl

·         FileService\FileServiceContract\FileServiceContract.vcproj: remove FileService.wsdl

5.4.14         WinBase\RDC sample generates assertion failure when built in Visual Studio 2008

You may receive an “Assertion failed” message when attempting to build this sample in Visual Studio 2008. This is caused by a post build instruction that attempts to register the COM component, but fails. To workaround this issue, build the sample in Administrator mode. From the Start menu, Microsoft Visual Studio 2008, Visual Studio Tools, then right click on a Visual Studio command prompt and select “Run as Administrator”.

5.4.15         Some WPF Tablet PC Ink samples may fail to run

The WPF Tablet PC ink samples listed below may fail to run. The WPF Tablet PC Ink samples are included in the .NET Framework samples component, and are installed by default to C:\Program Files\Microsoft SDKs\v7.0\samples\ These samples are out of date. Instead, please use the updated Tablet PC samples that install with the Win32 sample component. By default, these samples install to c: \Program Files\Microsoft SDKs\v7.0\samples\TabletPC.

·         InkAnalysisCanvas

·         InkCanvasClipboard

·         InkCanvasCustomRendering

·         InkCanvasDragandDrop

·         InkCanvasEditingModes

·         InkCanvasGestures

·         InkColorPicker

·         InkCube

·         InkSerialization

5.4.16         Possible issue with samples that use the location API.

When an application that uses the Location API first starts, or when a new location sensor is enabled, GetReportStatus may report a status of REPORT_RUNNING shortly before the location report is available. Therefore, an initial call to GetReport will return an error (ERROR_NO_DATA) or a value that is not from the expected location sensor, even if GetReportStatus indicates a status of REPORT_RUNNING. This can happen in the following cases:

·         The application polls for status by using GetReportStatus until a report status of REPORT_RUNNING is returned, and then calls GetReport.

·         GetReportStatus is called when the application starts. This may occur after creation of the location object, or after calling RequestPermissions.

An application can mitigate the issue by implementing the workaround documented on MSDN, in the reference topic for the GetReportStatus method, which is in the online MSDN Library under Win32 and COM Development > Devices > Location API > Location API C++ Programming Reference > ILocation > GetReportStatus. The workaround involves subscribing to location report events and waiting for the first report event. The code in the workaround should be used instead of the SimpleLocation sample in the SDK, which may not work as expected.

5.4.17         SideShow samples - updated install instructions for Simulator.

The readme.txt files for the Windows SideShow samples in the samples\winui\sideshow directory have incorrect instructions in the section entitled Simulator Setup. The correct instructions are:

  1. Open an elevated command prompt. (To do this: Click Start, point to All Programs, point to Accessories, right-click Command Prompt, and then select Run as administrator.)
  2. Go to the following location: [Windows SDK Installation Folder]\Bin
  3. If your Windows SDK installation does not contain the simulator setup file, DeviceSimulatorForWindowsSideShow.msi, download the file from the Microsoft Web Site.
  4. Run the command: DeviceSimulatorForWindowsSideShow.msi
  5. Install the simulator by using the wizard that appears.

5.5       Headers and Libraries

5.5.1         Conflict in definition of INTSAFE_E_ARITHMETIC_OVERFLOW in intsafe.h/comutil.h

Symptom: You are using the Windows 7 SDK development environment or Visual Studio 2008 or earlier compilers with the Windows 7 version of intsafe.h and at compile time receive the below warning:

warning C4005: 'INTSAFE_E_ARITHMETIC_OVERFLOW' : macro redefinition c:\program files\microsoft sdks\windows\v7.0\include\intsafe.h

Cause: This warning is reported because intafe.h and comutil.h have conflicting definitions of INTSAFE_E_ARITHMETIC_OVERFLOW.

Workaround: Intsafe.h must be included in the code before comutil.h and the warning will not occur.

Fix: This conflict is resolved in Visual Studio 2010 and later versions of the compiler package.

6.  Windows SDK Product Support and Feedback

The Windows SDK is provided as-is and is not supported by Microsoft. For technical support, there are a number of options:

6.1       Professional Support for Developers

Microsoft Professional Support for Developers provides incident-based access to Microsoft support professionals and rich information services to help developers to create and enhance their software solutions with Microsoft products and technologies.

For more information about Professional Support for Developers, or to purchase Professional Support incidents, please contact a Customer Representative at 1-800-936-3500. To access Professional Support for Developers, visit the MSDN Web site. If you have already purchased support incidents and would like to speak directly with a Microsoft support professional, call 1-800-936-5800.

6.2       MSDN Online

MSDN Online provides Developer Support search, support incident submission, support highlights, service packs, downloads, technical articles, API information, blogs, newsgroups, forums, webcasts, and other resources to help optimize development.

6.3       Ways to Find Support and Send Feedback

Your feedback is important to us. Your participation and feedback through the locations listed below is appreciated.

·         The MSDN Forums are available for peer-to-peer support.

·         Windows SDK Developer Center is the official site about development using the Windows SDK, and provides information about the SDKs, links to the Windows SDK Blog, Forum, online release notes and other resources.

·         The Windows SDK Forum deals with topics related specifically to the Windows SDK.

·         The Software Development for Windows Client forum contains an updated list of related forums.

·         You can also send mail to the Windows SDK Feedback alias at

·         The Windows SDK Blog contains workarounds,  late-breaking and forward-looking news.

Copyright © 2009 Microsoft Corporation. All rights reserved. Legal Notices: