Partager via


Where are the SDK tools? Where is ildasm?

C:\Program Files\Microsoft SDKs\Windows\v6.0\bin\ildasm.exe
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\ildasm.exe
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exe
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\x64\ildasm.exe
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\ildasm.exe
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\ildasm.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\ildasm.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\ildasm.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\ildasm.exe

What are all these different versions for? Which one should I use? Sumit Kumar is the Project Manager for “Windows SDK”, so I sat down with him to find out. The Windows SDK blog is at https://blogs.msdn.com/windowssdk/.

(Note: the last four directories exist but don't actually contain a copy of ildasm.exe. I just put them there for dramatic effect.)

What are the SDK tools?

The SDK tools are a sort of grab-bag of utilities that advanced programmers will find useful. Some are general tools put forward by the Windows and C++ teams. Others are for .Net development from the CLR or Visual Studio teams. There are over 100 tools but so far I’ve only used these:

                ildasm.exe – dumps out the IL bytecode from a .net assembly.
peverify.exe – verifies that Visual Basic produces valid .net assemblies.
gacutil.exe – checks which assemblies are in the Global Assembly Cache
guidgen.exe – generates a new GUID
consume.exe – consumes memory or CPU or page-file or disk, as a stress test

The Windows SDK blog is a great place to find out about them. Bonus: a .net game called Terrarium!

The “Windows release track of the SDK tools” means that whenever a new version of Windows is released, they release a new version of the SDK tools as a free download. The intention is that this release of the tools is good for targeting this release of Windows. So when Version 6.0 of Windows was released, i.e. Vista, they released the tools in “C:\Program Files\Microsoft SDKs\Windows\v6.0”.

The “Visual Studio release track” means that whenever a new version of Visual Studio is released, it incorporates a version of the SDK tools as well. The intention is that this release of the tools is good for targeting anything that this release of Visual Studio can target. (Because VS can target most prior versions of the .Net framework, it means that the VS version of the SDK tools will also include prior versions of the .Net-specific tools.) For the VS release track, the tools directory name has the suffix “A” after it. So Visual Studio 9 (which came out after v6.0 of Windows) went in “C:\Program Files\Microsoft SDKs\Windows\v6.0A”.

Sharp readers will look at the list above and think “Ahah! In the list above he wrote v7.0A! The “A” means it’s a release of Visual Studio. And the 7.0 means that the next Windows will be released before Visual Studio 2010!” Hold your horses! I’m sorry to disappoint you, but we picked these numbers and directory names for the SDK a long time in advance, there's no guarantee that they're final, and the numbers end up bearing no relation to release schedules.

 

.Net 4.0 ? 64 bit ?

Visual Studio 2010 will ship with a new version of .Net, version 4.0. But it supports "multi-targeting", where you can target older versions of .Net as well. And so it has to ship .Net3.5 versions of the tools as well as .Net4.0 versions of the tools.

Also, some of the tools have 64bit versions; others are 32-bit only. The 64bit versions are only installed if you have a 64bit operating system. The 64bit versions are found in subdirectories called "...\x64". If the x64 directories does not contain a particular tool, then it means that we haven't shipped a 64bit version of that tool, and you're expected fall back to the 32bit version.

So here's the complete table. Only the shaded rows actually exist. The rest are all potential future versions that Microsoft won't commit to until it ships them.

 

 

Registry and folder locations

When you launch the "Visual Studio Command Line Tools" shortcut from the start menu, it sets the PATH environment variable to point to appropriate versions of the tools.

But if you have your own tooling and want to point it to the correct locations, you should use the registry. For release 7.0A of the tools we expect to use these registry keys. Once again, these are not final and might change when we ship Visual Studio 2010.

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x64]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\x64\"

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x86]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x64]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x86]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-VSHeadersLibs]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\"

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-VSTools]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\"

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-VSWin32Tools]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\"

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDKIntellisenseRefAssys]
"InstallationFolder"="C:\Program Files\Microsoft SDKs\Windows\v7.0A\"

 

The set of registry keys isn't complete for all past versions of the tools. To compute the path to earlier versions of the tools is awkward. That's because different languages use different paths (e.g. Italian versions of Windows use C:\Programmi) and because users can themselves choose different paths (e.g. E:\Apps).

Notionally in VB you should use My.Computer.FileSystem.SpecialDirectories.ProgramFiles. This returns "C:\Program Files" or its equivalent, and works great most of the time. The only exception is if you're running on a 64bit operating system and your assembly is set to target "CPU:x86" rather than AnyCPU or x64. In this case it returns "C:\Program Files (x86)" or its equivalent, which isn't any use.

Anyway, the Windows SDK tools use non-localized directory and filenames. So once you get to the path to the program files directory, you can append "\Microsoft SDKs\Windows\v6.0\bin\ildasm.exe" or similar to point to a particular tool.

Comments

  • Anonymous
    February 09, 2013
    Why did you delete my constructive comment to this blog post?

  • Anonymous
    February 11, 2013
    Hi Fduch! Sorry, I'm not sure what happened to your post. It looks like the MSDN infrastructure reported it as likely spam, though it wasn't, not at all. You wrote: "This post ask a question "Which one should I use?", but never answers it. Did Kumar just answered "no comments" when you've asked him how to solve this big mess?" For a user who has the latest version of Visual Studio, I don't think there's any reason to use the Windows version of the tools. (I can't remember what Kumar said... it's been a long time since I wrote this article!)

  • Anonymous
    October 28, 2013
    This was exactly what I needed. Thanks for the quick chart.

  • Anonymous
    April 01, 2014
    Very good information

  • Anonymous
    February 16, 2015
    This was exactly what I needed. Thanks for the quick chart.

  • Anonymous
    February 24, 2016
    User .net developer prompt and type ildasm

  • Anonymous
    March 16, 2016
    For a user who has the latest version of Visual Studio, I don't think there's any reason to use the Windows version of the tools. is the latest version Visual Studio compatible with the old version of Visual Studio?

  • Anonymous
    September 19, 2017
    In сasse you are the type of one ԝho is loѡer tһan tһrilled withh the prosρect of working in the identical workplace, day agter day, еliminating this type оff routine is without doubt one of the mօst necessary highlights whicһ you could obtain from freelancing. While you hire yourseⅼf out as a freelancer,every jօb assignment that youu simply taқe on will probably be a new adventure. Not only will the work environment fluctuate, but additionally, you will have the chance to fulfill many extda fascinating people. This issue alone is without doubt one of the main tthе exzplanation why many paralegals prefer freelancing over comnmitting themselves to 1 specifi wоrkplace.

  • Anonymous
    October 19, 2017
    The showcase takes place yearly ahead of the June NBA draft and permits school basketball gamers to exhibit their skills and meet with league personnel.

  • Anonymous
    January 24, 2018
    I was searching for this since long and now i have found the solution here.

  • Anonymous
    February 23, 2018
    I’ve never thought about %BT% in this manner.Many thanks author, it was very interesting to read!Could you present a piece of you writing talent with me?It could help a lot in that infinite paper writing for school.Due to this, I made a decision to get paper from online composing services.And to be sure that I won’t spend my money on scam,I click here Matilda where I can read truthful and competent reviews of a variety of writing websites.

  • Anonymous
    March 12, 2018
    Say thanks guys in order to keep me personally renovated together with most recent improvements having Where are the SDK tools? Where is ildasm?! That is certainly things I needed and even discover any request specialized help.

  • Anonymous
    June 17, 2018
    Typically, mortgage provider adjusts the compensation date in response to the upcoming payday of the borrower that helps one to make the reimbursement on time with no hassle.

  • Anonymous
    June 26, 2018
    That is certainly things I needed and even discover any request specialized help.

  • Anonymous
    August 07, 2018
    Social media is still huge medium for any business.Today, June 2013, now Facebook has over 1 Billion users.It is incredible.

  • Anonymous
    August 14, 2018
    Great web site you have got here.. It's hard to find quality writing like yours nowadays.I honestly appreciate people like you! Take care!!

  • Anonymous
    October 15, 2018
    They don't bother me :)

  • Anonymous
    October 16, 2018
    Susan was great , I definitely went there for the cows and the girls in Dirndls  :-)No seriously, excellent article, Kudos.