Are you having problems building some of the Windows Vista SDK samples on an X64 machine?  This is the first of a series of posts with workarounds to get you building.  I’ll be following up with more.  Have you found workarounds to other issues? Share them here or email me.

1.  Error that affects everyone building managed samples with the .NET Framework: SetEnv.cmd uses X86 framework

Problem:  A bug in the SDK build environment prevents x64 from pointing to the 64bit framework directory. (Invoking SetEnv.cmd with the /x86 parameter will cause the build environment to use the x86 frameworks.) To use the x64 frameworks you will need to update a file to point to the x64 framework. (This issue has been fixed in the Windows SDK for Microsoft Windows Server code name “Longhorn” and .Net Framework 3.5.). 

Workaround:  You will need administrator privileges to perform this. On Vista, Right click Notepad and run as Administrator. From within Notepad, open Bin\SetEnv.Cmd and change line number 204 from:

SET FxTools=%windir%\Microsoft.NET\Framework\v2.0.50727


SET FxTools=%windir%\Microsoft.NET\Framework64\v2.0.50727

save your changes to SetEnv.Cmd.

Karin Meier

Windows SDK Samples Program Manager