none
How to get the WinSDK Configuration Tool to work

    คำถาม

  • Update: please install the Windows SDK for Windows 7 and .NET Framework 3.5 SP1, which contains a fixed version of this tool.


    This article applies to the Windows SDK for Server 2008 and .NET Framework 3.5.

    The Windows SDK Configuration Tool sets which version of Windows SDK headers, libraries and tools you want to build with in Visual Studio. The tool shipped with the Windows SDK for Server 2008, and bugs have since been discovered that affect different scenarios. Here’s how to get the tool working in your scenario. Instructions are different depending on which Visual Studio release and SKU you’re using.  This post addresses the version of the SDK Configuration Tool that shipped in the Windows SDK for Server 2008.

     

    Visual Studio 2008 Retail:

    First, the Visual Studio 2008 SP1 patch breaks the tool. If you’ve installed the patch on VS 2008 Retail (non-Express versions), you need to first complete the workaround explained in this blog post. Read the blog post Integrating Windows SDK and VS with new SDK Configuration tool if you want background on the tool. Next, the GUI version of the tool looks like it works but it doesn’t really change the paths. This will affect you even if you haven’t installed the SP1 patch. You have to use the tool at the command line, following these steps.

     

    To use the Visual Studio command line build environment:

    1. Launch Visual Studio 2008 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, which is the Windows SDK for Server 2008. You can switch back to v6.0a to use the SDK components that shipped in Visual Studio 2008.

    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.

     

    To use the Visual Studio IDE:

    Follow the instructions above to launch the tool from the command line build environment then switch to the IDE, or use workaround # 2 in this post to update  HKEY_CURRENT_USER to point to the version of the SDK that you wish to build with. This workaround ‘permanently’ sets the SDK version you have set as “current.” It will remain the current SDK until it is changed again through the registry. (Running Repair on Visual Studio or the Windows SDK can change this value in the registry.)

     

    Visual Studio 2008 Express:

    Read the blog post Using Visual C++ 2008 Express with the Windows SDK if you need background. The only bug on Express is that the GUI version of the tool doesn’t work. (The Visual Studio 2008 SP1 Patch does not affect Express versions.) You have to use the command line version of the tool to set the ‘current SDK’, but then you can use VS 2008 Express in the IDE or command line mode.

    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. Use ‘-version:v6.1’ for the Windows Server 2008 SDK content. Use ‘-version:v6.0A’ for the Visual Studio 2008 content.

     

    Visual Studio 2005 Retail:

    On VS 2005, the tool works by overwriting your VCProjectEngine.dll.config file and a bug causes it to do so without warning, so back this file up first if you have custom settings you want to keep. Read the blog post Integrating Windows SDK and VS with new SDK Configuration tool for background on the tool. The tool works well in either GUI or command line version with VS 2005, with the exception of one scenario. The configuration tool requires that VS 2005 C++ has been run at least once.  Intermittently, users will get an error that “VS 2005 must be run at least once…” even though VS2005 has already been run. This seems to affect some users that have installed VS 2005 as Administrator but are running as Limited User. You can probably get it working by running VS as an Admin.

     

    Visual Studio 2005 Express:

    The tool is not supported on Visual Studio 2005 Express.  Upgrade to Visual Studio 2008 Express or set your header, library and tool paths manually.

     

    --Karin  Meier

     

    ||Karin Meier||Windows SDK PM||Build Environment.Samples.Community ||http://blogs.msdn.com/KarinM||

     

    The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.

     

     

     

     

    • แก้ไขโดย Karin Meier 7 สิงหาคม 2552 5:55 add info about new release
    13 ตุลาคม 2551 2:32

ตอบทั้งหมด

  • On my Vista x64 machine the WindowsSdkVer.exe contains the following code in the UI_ThreadException method:

            private static void UI_ThreadException(object sender, ThreadExceptionEventArgs e)

            {

                      throw e.Exception;

            }

    That means an exception will break the application down. I needed to switch to 6.1 for VS 2005 and also my location is Russia. Thus, I had stumbled on the one more issue related to parsing strings. It got me to export the entire code out of WindowsSdkVer.exe by using reflector and rebuild it eliminating these issues. I have described all neccesary steps in my blog post.

    27 มกราคม 2552 19:24
  • Issues regarding Windows Server 2008 SDK installation and usage

    I recently experienced some problems when I tried to use Windows Server 2008 tools from Visual Studio 2008. Following is a description of the environment where this happened and a description of how I worked around several contributing problems.

    I have a notebook running Windows XP Professional, where I installed in the order mentioned: .NET Framework 3.5, .NET Framework 3.5 Service Pack 1, Visual Studio 2008, Visual Studio 2008 Service Pack 1 and lastly Windows SDK for Server 2008 and .NET 3.5.

    I then a have a build server, running Windows Server 2003 on VMWare with the same setup as the development machine described above.

    I found a trivial but important difference between the SDK installations on the two machines which I can not yet explain and I was hoping that you could shed some light on the matter. I also have a question about msbuild regarding a possible bug that, combined with the above mentioned difference that I will describe in the following paragraph, had me running around in circles while trying to pinpoint the problem.

    We have a Visual Studio 2008 project that needs to call the resource compiler rc.exe, that can be found in the Windows SDK bin folder. Rc.exe is called from a pre-build event. Note that Visual Studio 2008 installs Windows SDK 6.0a, so that any PC that also has the Windows Server 2008 SDK (SDK 6.1) installed will have two versions installed under C:\Program Files\Microsoft SDKs\Windows (if installed in the default location).

    The command in the pre build event is:

    "$(FrameworkSDKDir)bin\rc.exe" /r "MyResourceFile.rc"

    The build server mentioned above can build the solution successfully. According to the windows registry key (HKLM\Software\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder), it is using rc.exe from the SDK 6.0a installation folder (C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe). I can also confirm that from the Visual Studio build output, as well as the msbuild output from the command line.

    The development notebook mentioned above was initially unable to build the solution. According to the msbuild and Visual Studio output it was trying to execute rc.exe also from "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe", but I received an error 9009 indicating that rc.exe was not in that location. Upon investigation I found it under "C:\Program Files\Microsoft SDKs\Windows\v6.1\bin\rc.exe", which is the SDK 6.1 installation. I found that on the notebook, rc.exe was missing from 6.0a but present in 6.1, and on the build server, rc.exe was missing from 6.1 but present in 6.0a. 

    I followed the advice from this work around to point Visual Studio to SDK 6.1. I modified the registry keys under HKLM and HKCU to point to SDK 6.1. This had no effect as both Visual Studio and msbuild command line still tried to find rc.exe under the 6.0a folder.

    After some investigation and reflecting using Redgate Reflector, I found that the variable $(FrameworkSDKDir) will always resolve to the 6.0a installation if that SDK is installed and the target framework is 3.5. This is due to a possible bug in the .NET Type Microsoft.Build.Shared.FrameworkLocationHelper, in assembly Microsoft.Build.Utilities.v3.5, Version=3.5.0.0 that shipped with .NET Framework 3.5. The problem I see is in the property PathToDotNetFrameworkSdkV35 in this class. It first reads the registry value for SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A\InstallationFolder, while I believe it should actually first read SOFTWARE\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder.  

    I worked around this problem by hacking the key SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A\InstallationFolder to point to 6.1. This enables me to use rc.exe from SDK 6.1, while it might affect other products that expects to retrieve the 6.0a installation folder from the registry.

    I have the following questions regarding the issues described above:
    1. Why would rc.exe install to different locations on two otherwise seemingly equivalent machines?
    2. Is the code that I refered to in Microsoft.Build.Shared.FrameworkLocationHelper affected by a bug? and if so
    3. Is there a work around / fix other that the method that I described?

     

    Kind regards
    Kobus van der Merwe

    • เสนอเป็นคำตอบโดย AAAhmed 14 พฤษภาคม 2552 14:17
    13 มีนาคม 2552 10:50
  • I found a lot of issues about "error spawning rc.exe" and "Error spawning mt.exe" on the web when using msbuild or vcbuild from the command line.  For me the issue was that things were installed into C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 instead of Microsoft SDKs\Windows\{version}\.

    The above was the only place that led me to an answer.  I actually just copied the exe's and dll's from one directory to the other instead of playing with the registry, but the problem was the same.
    14 พฤษภาคม 2552 14:20
  • I installed Windows SDK for Windows Sever 2008, and I'm trying to get it set up for Visual Studio Express 2008.

    I ran the command line setup tool (my directory structure is a bit different for some reason: C:\Program Files\Microsoft SDKs\Windows\v6.1\Setup ), but I get this output:
    Input string was not in a correct format.
    at System.number.STringToNumber(String str, NumberStyles options, numberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Version..ctor(String version) at WindowsSdkVer.Utility.GetInstalledProducts(String rootKey, String productVersionKey, String installationFolderKey) at WindowsSdkVer.VersionSelector.GetInstalledSdkVersions() at WindowsSdkVer.ConsoleSelectionManager.get_InstalledSdkVersions() at WindowsSdkVer.Program.Main(String[] args)

    19 พฤษภาคม 2552 21:13
  • The Configuration Tool the shipped in the Windows Server 2008 SDK has a known issue with Visual Studio Express 2008. These issues are fixed in the Windows 7 SDK. The Release Candidate pre-release is available here:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=f75f2ca8-c1e4-4801-9281-2f5f28f12dbd&displaylang=en

    If you're only interested in the new Configuration Tool, de-selext all the features on the Feature Selection page, this will give minimal SDK (only a few megs) and the Configuration Tool will be installed to  C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup . You can always go back and add more features later through Add/Remove Programs. 

    • เสนอเป็นคำตอบโดย Shawn Henry - MSFT 21 พฤษภาคม 2552 23:09
    20 พฤษภาคม 2552 5:36
  • Running  the SDK Configuration Tool solved my problem. Many thnaks!!

    3 มิถุนายน 2553 15:49
  • Hi Karin,

    are there any known issues with the configuration tool from the Windows 7.1 SDK (Win7 and .net 4)?

    I have VS2008 and VS2010 installed on the same machine and running the configuration tool doesn't allow me to set the VS2008 configuration from SDK 6.0A to 7.1.

    I'm running Windows 7 RTM, x86 - German. VS2008 and VS2010 are both english.

    Any ideas?

    best regards
    André


    "A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
    20 กรกฎาคม 2553 15:55
  • No one? Am I the only person with this issue?

    "A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
    29 กรกฎาคม 2553 0:28
  • I am having the same problem as you Andre.

    13 สิงหาคม 2553 9:37
  • Look here

    http://blogs.msdn.com/b/windowssdk/archive/2009/08/21/windows-sdk-configuration-tool-may-report-an-error-when-os-display-format-is-not-english.aspx

    My format was danish even though my Windows is english. Switching the format to english solved the problem.

     - Rikke
    13 สิงหาคม 2553 9:48
  • Hi Rikke,

    I was able to fix it by running

    WindowsSdkVer.exe -version:v7.1

    from the command prompt. At this time it doesn't fail even with the German language settings.

    André


    "A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/
    13 สิงหาคม 2553 13:42
  • hi ,

    please make sure you have the new SDK version people !!

    the SDK team blog / http://msdn.microsoft.com/en-us/windows/bb980924.aspx

    the download of the Microsoft Windows SDK for Windows 7 and .NET Framework 4 /

    http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en

    and if you have problems or a Q or some feedback //

    wsdkfdb@microsoft.com NOTE to mods , permission given to post the mail !!

    enjoy !!

    have a nice day


    Scan with neCare + Support ENDING for windows Vista & XP ! + Plagued by the Privacy Center? REMOVE IT + Threat Research & Response Blog + Sysinternals Live tools + TRANSLATOR + Photosynth + Microsoft Security + Microsoft SUPPORT + PIVOT from Live Labs + Microsoft Live Labs + Get OFFICE 2010 FREE ! + Windows LIVE !

    What's the problem? Something error occurs when opening the link.
    28 สิงหาคม 2553 0:58
  • the download of the Microsoft Windows SDK for Windows 7 and .NET Framework 4 / http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en

    Fail. Fail. Fail.

    I downloaded the ISO version instead but I bet its 3 failures are the same.

    First, the WinSDK Configuration Tool wouldn't even execute.  The Configuration Tool depends on the .Net Framework and the .Net Framework that had just finished installing didn't provide the .Net Framework that the Configuration Tool needs in order to even start executing.

    Microsoft Update installed some obsolete versions of the .Net Framework.  After that, the Configuration Tool was able to execute.

    Second, the ordinary GUI operation of the Configuration Tool yielded the same error as reported by Andre Ziegler.  Yup, it's perfectly true that I don't have Visual Studio 2005 or 2008 installed on that machine.  Does anyone know if there's a version of this SDK for Visual Studio 2010?

    Well, the command line version executed without displaying any errors.  As described later by Andre Ziegler, command line

    WindowsSdkVer.exe -version:v7.1

    pretended to work.

    Third, the supposed success was a lie.  No wait, two lies.

    In a new Visual C++ 2010 project, the VC++ directory settings still gave priority to the directories installed by Visual Studio 2010 in preference to SDK directories.

    And, when finding declarations in .h files, some declarations were found in SDK 7.0A directories even though the Configuration Tool pretended it had set SDK 7.1 to be current.

    At least we can be glad that Microsoft's neglect of testing isn't the worst in the world.  It doesn't leak radioactive iodine, cesium, and plutonium.  It doesn't kill people... except if Windows is embedded in medical devices or nuclear machinery... oops, wait...

    • เสนอเป็นคำตอบโดย Larry S. Smith 11 ธันวาคม 2554 14:05
    31 มีนาคม 2554 7:13
  • Here are my experiences with VS 2010 SP1 and SDK 7.1. From the SDK command prompt, cl.exe with /showIncludes uses the headers from the 7.1 SDK, as expected. But VS 2010 SP1 still uses the 7.0A headers it ships with. I tried to fix that with WindowsSdkVer.exe, but it didn't work.

    First WindowsSdkVer.exe has been  moved to C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup so it's not the SDK path. Perhaps because it's known to be broken? Anyway, running WindowsSdkVer.exe (GUI) does find both the 7.0A and 7.1 SDK, but it fails to set anything with only VS2010 installed complaining that it can't find VS 2005!

    • เสนอเป็นคำตอบโดย Dabur972 20 ธันวาคม 2554 6:54
    • ยกเลิกการนำเสนอเป็นคำตอบโดย Dabur972 20 ธันวาคม 2554 6:54
    11 ธันวาคม 2554 14:10
  • what it is use grmsdk_en_dvd.iso and how to know this more?
    anyone can tell me what it is use for? cuz i cant play any games in my computer even a GTA SA plz help me how to know what will i do my pc is new and i can play only the mini games in windows 7 like chess,mines.solitare, etc. thnx if you help me cuz i really really really wants to play T_T

    18 ธันวาคม 2554 10:53
  • Here are my experiences with VS 2010 SP1 and SDK 7.1. From the SDK command prompt, cl.exe with /showIncludes uses the headers from the 7.1 SDK, as expected. But VS 2010 SP1 still uses the 7.0A headers it ships with. I tried to fix that with WindowsSdkVer.exe, but it didn't work.

    First WindowsSdkVer.exe has been  moved to C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup so it's not the SDK path. Perhaps because it's known to be broken? Anyway, running WindowsSdkVer.exe (GUI) does find both the 7.0A and 7.1 SDK, but it fails to set anything with only VS2010 installed complaining that it can't find VS 2005!


    hi ,

    updates ??

    have a nice day


    Scan with OneCare + Support ENDING for windows Vista & XP ! + Plagued by the Privacy Center? REMOVE IT + Threat Research & Response Blog + Sysinternals Live tools + TRANSLATOR + Photosynth + Microsoft Security + Microsoft SUPPORT + PIVOT from Live Labs + Microsoft Live Labs + Get OFFICE 2010 FREE ! 
    20 ธันวาคม 2554 6:54
  • Inside the VC++ project you can set the tools to use WinDSK 7.1:

    Have you tried this?


    "A programmer is just a tool which converts caffeine into code"

    21 ธันวาคม 2554 22:37