Windows Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5 Release Notes

1. Welcome

Welcome to the Microsoft® Windows® Software Development Kit (SDK) for Windows Server 2008 and .NET Framework 3.5. The Windows SDK contains documentation, samples, headers, libraries, and tools designed to help you develop Windows applications.

This release of the Windows SDK does not include a .NET Framework Redistributable Package. Windows Vista and Windows Server 2008 include .NET Framework 3.0 but do not include .NET Framework 3.5. Users running Windows Server 2003 and Windows XP must install the .NET Framework 3.0 or 3.5 to run and develop .NET Framework applications. Some samples and tools included in the Windows SDK also require you to install the .NET Framework 3.5.

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

  • Debugging Tools for Windows can be used to debug drivers, applications, and services on systems running Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008 as well as for debugging the operating system itself. Versions of the Debugging Tools for Windows package are available for 32-bit x86, native Intel Itanium, and native x64 platforms.
  • 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 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 includes several fixes for .NET Framework 2.0 and .NET Framework 3.0.
  • 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.
  • Visual Studio 2005 extensions for .NET Framework 3.0 (Windows Workflow Foundation) provides developers with support for building workflow-enabled applications using Windows Workflow Foundation.
  • Windows Server 2008 Developer Center is the official site about development and management of applications on the Windows Server 2008 platform. The Developer Center includes product information, news, tools, and code samples.

back to top

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.

back to top

3. Supported Compiler, Platforms, and Related Software

This release of the Windows SDK supports Microsoft Visual Studio 2005 SP1, Microsoft Visual Studio 2008, the Microsoft Visual Studio 2005 Express Editions 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 platforms for building and running applications on Windows XP SP2, Windows Server 2003 R2, Windows Vista, and Windows Server 2008.

back to top

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.

We recommend that the Windows SDK be installed on a clean computer or completely uninstall any pre-releases of .NET Framework 3.0, .NET Framework 3.5, 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. 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\v6.1.

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 in two versions: a DVD ISO image and a Web download.

  1. Either:
    • If you downloaded the SDK as an ISO, either 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.
    • Launch the download via the MSDN Download Center.
  2. Follow the instructions in the Windows SDK Setup wizard.

Note that if you are installing the SDK to a custom location, the Microsoft Document Explorer and the ATL/MFC runtime are not installed by the Windows SDK. See section 5.2.2 for more information on this issue.

4.1.3 Windows SDK Start Menu Shortcuts

Access the Windows SDK shortcuts through the Start menu. The Start menu folder contains shortcuts to:

  • The SDK build environment command window
  • Windows SDK Release Notes
  • Windows SDK documentation
  • Tools
  • Windows SDK Configuration Tool (located under Visual Studio Registration)

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 developing with Visual Studio 2008, it is not necessary to do an additional install.

4.2 Uninstalling

Several applications need to be uninstalled separately from Add/Remove Programs (Programs and Features on Windows Vista or Windows Server 2008) in order to remove all Windows SDK components:

  • Microsoft Windows SDK for Windows Server 2008
  • Microsoft FxCop 1.35
  • Microsoft Document Explorer
  • Microsoft Visual C++ Compilers 2008
  • Microsoft .NET Compact Framework 3.5

You might have installed some of these applications with another product besides the SDK. Removing those applications will make those applications unavailable for other applications that might use them. For example, the Microsoft Visual Studio offline documentation has a dependency on Microsoft Document Explorer.

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

In order to utilize Windows SDK headers, libraries, and tools within Microsoft Visual Studio 2005, the SDK-provided Visual Studio Configuration Tool must first be run. This is not necessary with Microsoft Visual Studio 2008. The Windows SDK Configuration Tool must be run for each user on Windows Vista or Windows Server 2008.

To run the Microsoft Visual Studio 2005 Registration Tool, go to Start > All Programs > Microsoft Windows SDK v6.1 > Visual Studio Registration > Windows SDK Configuration Tool (on Windows Vista or Windows Server 2008, right-click and select Run as Administrator).

4.4 Building Samples

When building Samples, do so in a directory outside c:\program files to which you have write access. 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.
  3. Build the sample from the command line as follows:
    • Build a makefile by typing nmake
    • Build a .csproj file by typing msbuild mysample.csproj
    • Build a .vbproj file by typing msbuild mysample.vbproj
    • Build a .sln file by typing msbuild mysample.sln
    • Build a .vcproj file by typing vcbuildmysample.vcproj

4.4.1 Building .NET Framework Samples

Samples demonstrating .NET Framework 3.0 and 3.5 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.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\v6.1.

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.

Directory Contents
\Bin Windows SDK tools
\Help Windows SDK documentation
\Include Windows SDK headers
\Lib Import libraries and TLB files
\License Windows SDK license information
\NoRedist Non-redistributable files
\Redist Redistributable files
\Samples Windows SDK samples
\Setup Setup files

back to top

5. Known Issues

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

Build Environment
Documentation
SDK Tools and Compilers
Samples
Windows Headers and Libraries

5.1 Build Environment

5.1.1 Setting a Build Environment to Target Windows Vista SP1

You can use the switches shown below to target different operating systems from within the SDK build environment. To target Windows Vista you should use the /vista switch. To target Windows Vista SP1 you should use the /2008 switch. Launch the Windows SDK build environment (Start > All Programs > Microsoft Windows SDK CMD Shell) and change directories to the \Bin folder. At the prompt, type:

setenv /[desired OS switch]C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin> setenv /?     Usage: "Setenv [/Debug | /Release][/x86 | /x64 | /ia64][/vista | /xp | /2003 | / 2008 ] [-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

5.1.2 MSBuild Reports 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\v6.1

Additionally, in order to use AL.exe, the ALToolPath parameter must be set and passed to msbuild. For the default install location, you can use the following command:

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

5.1.3 Running the Windows SDK Configuration Tool fails in Windows Vista

In Windows Vista, running the Windows SDK Configuration Tool fails with the error Unable to access the required files. This failure is because the configuration tool needs to be run with elevated privileges. To run the tool with these privileges, go to Start > All Programs > Microsoft Windows SDK V6.1 > Visual Studio Registration > Windows SDK Configuration Tool (on Windows Vista or Windows Server 2008, right-click and select Run as Administrator).

Alternatively, open an SDK build environment as Administrator and run the Windows SDK Configuration tool from there.

5.1.4 Microsoft Visual Studio 2005 or 2008 Are 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.

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.6 Installing Windows SDK for Server 2008 after Visual Studio 2008 breaks VS command line build environment

After installing the Windows SDK for Windows Server 2008, you are no longer able to build at the VS2008 command line. You receive an error that csc, vbc, and/or msbuild commands are not recognized. You are able to build without problems in the VS IDE.

Cause: The VC++ compilers that install with the Windows SDK are overwriting vcvars32.bat improperly.

Workaround: Repair the VS2008 command line build environment by editing c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat manually.

Close all instances of Visual Studio.

  1. Use Notepad to edit the file %\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat. Change the top few lines where the variables are set.

    Change these lines:

    @SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC@SET FrameworkDir=Framework32@SET FrameworkVersion=v2.0.50727@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

    to the following, in order to set the correct path to the FrameworkDir:

    @SET VSINSTALLDIR=c:\Program Files\Microsoft Visual Studio 9.0@SET VCINSTALLDIR=c:\Program Files\Microsoft Visual Studio 9.0\VC@SET FrameworkDir=c:\Windows\Microsoft.NET\Framework@SET FrameworkVersion=v2.0.50727@SET Framework35Version=v3.5@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

     

  2. Open the VS command line build environment and verify that you can build successfully.

back to top

5.2 Documentation

5.2.1 Documentation on the Windows Vista Game Explorer is not included in the Windows SDK for Windows Server 2008

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

5.2.2 Installing the SDK to a custom location results in unreadable docs and some tools fail

When the Windows SDK is installed to a custom location, the Microsoft Documentation Explorer and the ATL/MFC runtime are not installed by the Windows SDK. These components may already have been installed by other applications, such as Visual Studio or MSDN. If these items have not been installed previously, then documentation will not open and some tools, such as guidgen.exe, will not run.

To workaround this issue:

  1. Navigate to <system drive>\Program Files\Microsoft SDKs\Windows\v6.1\Setup\sfx
  2. Double-click on dexplore.exe and vcredist.exe to install Microsoft Document Explorer and the ATL/MFC runtime.

back to top

5.3 SDK Tools and Compilers

5.3.1 Some Tools Are Not Included with This Release of the Windows SDK

The following tools are not included with this release of the Windows SDK. These tools had been in the Windows SDK Vista Update:

  • caspol.exe
  • depends.exe (the Dependency Walker tool can be downloaded from https://dependencywalker.com)
  • installutil.exe
  • msdis150.dll
  • regasm.exe
  • tracelog.exe
  • uispy.exe

5.3.2 Some Tools Require .NET Framework 3.5

The following tools require .NET Framework 3.5, which does not ship with the Windows SDK:

  • sqlmetal.exe
  • wsatui.dll
  • aspnet_merge.exe
  • SvcConfigEditor.exe
  • xsltc.exe

5.3.3 The Windows Performance Toolkit Installer (Xperf MSI) Included in the Windows SDK Corresponds to the Platform of the Computer on Which the Windows SDK Is Installed

The version of the Windows Performance Toolkit installer (Xperf MSI) placed on your local drive by Windows SDK setup will correspond to the platform of the computer on which the Windows SDK is installed. In order to get Xperf MSI for a specific platform you will need to install Windows SDK on a computer with that platform (for example, to get Xperf_x64.msi, install the Windows SDK on an x64 computer). Note that during setup you might select only the Tools node to do a quick install of only Windows SDK tools.

5.3.4 The command-line environment for the Windows SDK Version Selection 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.

There is no workaround for this issue.

5.3.5 Visual Studio 2008 will overwrite the files ADM64.VCPlatform.config and Itanium.VCPlatform.config if it is installed after the Windows SDK

If Visual Studio 2008 is installed after the Windows SDK on a 64-bit machine, the SDK build environment will use the 64-bit cross compilers instead the 64-bit native compilers. Visual Studio 2008 overwrites the files ADM64.VCPlatform.config and Itaniumn.VCPlatform.config that are installed by the Windows SDK. The SDK versions of the config files point to the native compilers. The Visual Studio 2008 config file points to the cross compilers.

Workaround:

On an x64 computer, in file c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\AMD64.VCPlatform.config

Replace:

Path="$(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkSDKDir)lib\win64;$(FrameworkDir)$(FrameworkVersion);$(FxCopDir);$(PATH)"

With:

Path="$(VCInstallDir)bin\amd64;$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkSDKDir)lib\win64;$(FrameworkDir)$(FrameworkVersion);$(FxCopDir);$(PATH)"

On an IA64 computer, in file c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\ia64\Itanium.VCPlatform.config

Replace:

Path="$(VCInstallDir)bin\x86_ia64;$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkSDKDir)lib\win64;$(FrameworkDir)$(FrameworkVersion);$(FxCopDir);$(PATH)"

With:

Path="$(VCInstallDir)bin\ia64;$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkSDKDir)lib\win64;$(FrameworkDir)$(FrameworkVersion);$(FxCopDir);$(PATH)"

5.3.6 Windows Performance Analyzer doesn’t start when double-clicking an ETL file.

Windows Performance Analyzer doesn’t start when double-clicking an ETL file because its .etl file association is incorrect.

To workaround this issue, the file association must be fixed manually. From a command line window (as administrator in Vista), run the following commands, adjusting the path to xperfview.exe as necessary:

assoc .etl=PerformanceAnalyzer.ETLFileftype PerformanceAnalyzer.ETLFile="%ProgramFiles%\Microsoft Windows Performance Toolkit\xperfview.exe" "%1"

5.3.7 SDK build environment fails on x86 computer with Windows XP and Visual Studio 2005

If your x86 Windows XP computer (which has version 5.1.2600.2180 of REG.exe) is running Visual Studio 2005 (but Visual Studio 2008 is NOT installed), 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.

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. The second call to REG in setenv.cmd is grabbing the output from the call above and setting VSRoot=VERSION 3.0, which breaks the Windows SDK build environment. (Other versions of REG.EXE will immediately throw an error when an invalid KeyPath/Value combination is specified.)

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

  1. Open 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 REM it out (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.3.8 SDK Configuration Tool appears to work but fails on VS 2008

Issue: The Windows SDK Configuration Tool (GUI mode) appears to update Visual Studio 2008 header, library and executable directories, but directories are not updated.  Users may not be aware of this because the SDK Configuration Tool returns a message saying that directories have been successfully updated.  The user may then build applications using an unexpected set of headers, libraries and tools. The command line version of the tool works as expected on VS 2008. VS 2005 is not affected by this issue.

Scenario: A user has Visual Studio 2008 installed and also has the Windows SDK for Windows Server 2008 and .NET Framework 3.5 installed.  The user runs the Windows SDK Configuration Tool to tell Visual Studio 2008 which version of the Windows SDK to use:  the Windows SDK components that ship in Visual Studio 2008, or the Windows SDK components installed with the standalone Windows SDK for Server 2008.  The user runs the Windows SDK Configuration Tool and changes the “current” SDK.  The tool returns a message saying the “Windows SDK Configuration Tool successfully set version X as the current version for Visual Studio 2008.”  In fact, the “current version” of the SDK has not been reset.  For more information, see the blog post here.

Workaround: Start the Windows SDK Configuration Tool in command line mode (an additional workaround is available here.)

1.       Launch Visual Studio 2008 build command line build environment command prompt

2.       CD to the directory where the SDK Configuration Tool is located (by default, C:\Program Files\Microsoft SDKs\Windows\v6.1\Setup).

3.       Run the SDK Configuration Tool, specifying which SDK version to make current: (Type:  WindowsSdkVer.exe -version:v6.1)

4.       You can now build at the command line using version v6.1 of the SDK.  (Specify v6.0a to use the SDK components in VS2008.)

5.       If you’d like to build in the Visual Studio IDE, while still in the Visual Studio command window, type:devenv /useenv

6.       The SDK version you have set as “current” will remain the current SDK for the current Visual Studio session.

back to top

5.4 Samples

5.4.1 C++ Samples Project Files Require Upgrade Prior to Building

To build the samples in the SDK build environment or in Microsoft Visual Studio 2008, you must upgrade the Win32 samples project files. The compilers in the SDK are VC 9.0, the same compilers that ship in Microsoft Visual Studio 2008. The sample project files in the SDK are written for VC 8.0 compilers, the compilers that ship in Microsoft Visual Studio 2005. This decision allows users to build the samples in Microsoft Visual Studio 2005. 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 Sample Dependencies

Some samples included with the Windows SDK have dependencies on components outside the Windows SDK.

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 2005 or Visual Studio 2008.

The SchemaReader sample requires Windows Media Player 11 or later to be installed.

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

The Multimedia\direct3d\d3d9ex sample requires the DirectX SDK(refer to the sample's readme for additional information).

5.4.3 Some Samples Require Microsoft Visual Studio 2005 and Will Not Build with Microsoft Visual Studio 2008

Some 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.

  • mspbase.h
    • netds\Tapi\Tapi3\Cpp\Msp\MSPBase
    • netds\Tapi\Tapi3\Cpp\Msp\Sample
    • netds\Tapi\Tapi3\Cpp\pluggable
  • mtype.h
    • netds\Tapi\Tapi3\Cpp\tapirecv
    • netds\Tapi\Tapi3\Cpp\tapisend
  • mfc80ud.lib
    • Sysmgmt\Wmi\VC\AdvClient

5.4.4 Not All C++ Samples with Visual C++ 2005 Project Files Have Configurations for x64

When building a C++ sample that does not have support for x64 on an x64 computer, 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:

  • Build the sample targeting x86 by using this code: vcbuild *.vcproj /platform=win32
  • Add x64 support by doing the following:
    1. Load the sample in Microsoft Visual Studio (C++).
    2. 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.5 Visual J# Samples Require VJ++ (Visual Studio) to Be Installed

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.6 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.7 Some Samples Might 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:\buildall_hxs\local\sampleexecutables\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.

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

Msbuild *.sln /p:platform=Win32Msbuild *.sln /p:platform=x64VCbuild *.vcproj /platform:Win32VCbuild *.vcproj /platform:x64

5.4.8 Some Samples Fail to Build Due to Missing File msime.h

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.

Affected samples:

  • 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.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 at C:\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.

Affected samples are:

  • CalculatorCS
  • CalculatorVB
  • MSMQSampleCS
  • RomanLegionCS
  • RomanLegionVB
  • SliderPuzzleCS
  • UltimateGmanCS
  • BubbleCS
  • BubbleVB
  • BankClientCS
  • POOMComInterop
  • DeviceNotification
  • RotatedTextCS
  • RotatedText
  • SqlCEResultSetSample
  • WebCrawlerCS

5.4.10 Win32 WinUI\Speech\Tutorial Sample Fails to Compile

The Windows SDK Win32 sample WinUI\Speech\Tutorial fails to compile, generating the following error:

error PRJ0019: A tool returned an error code from "Performing Custom Build Step".

Issue: a Custom Build Step in the VC project files incorrectly references the GC.EXE tool (speech engine) with a relative path.

To workaround this issue, edit each of the sample’s .vcproj files, removing ..\..\..\bin\ at the start of the command-line for any "Grammars" files.

5.4.11 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\v6.1\Bin
  • For x64 computers: C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64
  • For IA64 computers: C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\IA64

5.4.12 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.13 Some Tablet PC samples may fail due to missing reference assembly

Three Tablet PC samples will fail when built on a computer running an operating system earlier than Windows Vista or Windows Server 2008, with warnings and/or error similar to this:

error CS0234: The type or namespace name 'Ink' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Ink". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Affected samples:

  • TabletPC\InkDivider\CS
  • TabletPC\InkErase\CS
  • TabletPC\TIPAutoClaims

Cause: a necessary reference assembly, Microsoft.ink.dll, is missing from the Windows Server 2008 RTM version of the SDK. This reference assembly ships with Vista and Server 2008, so samples built on computers running those OSes will find the file and build successfully.

To workaround this issue, either:

  • Copy Microsoft.ink.dll from a computer running Vista or Windows Server 2008 and paste it into this folder: \Program Files\Reference Assemblies\Microsoft\Tablet PC\v6.0; or
  • Download the Microsoft Windows SDK for Vista Update and select (at minimum) Tools and Reference Assemblies from the Setup screen. Microsoft.Ink.dll will be installed to \Program Files\Reference Assemblies\Microsoft\Tablet PC\v6.0.

5.4.14 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\v6.1\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:
    • Open Programs and Features (Add Remove Programs on pre-Vista operating systems)
    • Select the Microsoft Windows SDK for Server 2008 and click Change
    • In the Maintenance screen, select Repair

back to top

5.5 Windows Headers and Libraries

5.5.1 Two .IDL files Are Installed to the Incorrect Directory

The dsattrib.idl and simpdata.idl files are installed to both <install folder>\Lib\x64 and <install folder>\Lib\ia64.

To workaround this issue and compile using these files, move the files to a directory that is in your build path (in other words, the INCLUDE environment variable), such as <install folder>\Include\x64 or <install folder>\Lib\ia64.

back to top

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.

back to top

On This Page

  • Welcome
  • Liscense Agreement
  • Supported Compiler, Platforms, and Related Software
  • Installing, Uninstalling, and Using the Windows SDK
  • Known Issues
    • Build Environment
    • Documentation
    • SDK Tools and Compilers
    • Samples
    • Windows Headers and Libraries
  • Windows SDK Product Support and Feedback