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 http://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.

Release "A"

Version

32/64bit

CLR

C:\Program Files\Microsoft SDKs\Windows\...

...\v6.0\bin\ildasm.exe

Windows

Vista

x86

.Net3.5

...\v6.0A\bin\ildasm.exe

VS

2008

x86

.Net3.5

...\v6.1\bin\ildasm.exe

Windows

Server2008

x86

.Net3.5

...\v7.0\bin\ildasm.exe

Windows

?? next version

x86

??

...\v7.0\bin\x64\ildasm.exe

Windows

?? next version

x64

??

...\v7.0A\bin\ildasm.exe

VS

2010

x86

.Net3.5

...\v7.0A\bin\x64\ildasm.exe

VS

2010

x64

.Net3.5

...\v7.0A\bin\NETFX 4.0 Tools\ildasm.exe

VS

2010

x86

.Net4.0

...\v7.0A\bin\NETFX 4.0 Tools\x64\ildasm.exe

VS

2010

x64

.Net4.0

C:\Program Files (x86)\Microsoft SDKs\Windows\...

This directory only exists on x64 systems, and it doesn‘t contain any tools executables.
Ignore it.

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.

时间: 2024-10-10 10:10:53

Where are the SDK tools? Where is ildasm?的相关文章

Skipping 'Android SDK Tools, revision 24.0.2'; it depends on 'Android SDK Platform-tools, revision 20' which was not installed.

前几天,同事问我eclipse android sdk怎么不能更新. 更新界面是显示(mirrors.neusoft.edu.cn:80),但是不能更新. 问题描述如下: URL not found: F:\Android\android-sdk\temp\samples-19_r05.zip (拒绝访问.) Skipping 'Android SDK Tools, revision 24.0.2'; it depends on 'Android SDK Platform-tools, revi

[转]关于sdk更新Android SDK Tools 25.3.1版本后使用sdk manager闪退

昨天这两个manager还工作正常,今天更新了一下,发现不可用了,运行avd manager和sdk manager没反应,搜了好多文章,然后看到了下这篇文章<关于sdk更新Android SDK Tools 25.3.1版本后使用sdk manager闪退>http://blog.csdn.net/ityangjun/article/details/62216605,似乎命令行sdkmanager.bat还是可以独立工作的,只能在命令行下工作,要图形界面必须得在AS里更新了. 同时找到另外一

Andrid SDK tools 目录下的工具介绍

 Andrid SDK tools 目录下的工具介绍 Android SDK包含了各种各样的定制工具,简介如下: Android模拟器(Android Emulator )它是在你的计算机上运行的一个虚拟移动设备.你可以使用模拟器来在一个实际的Android运行环境下设计,调试和测试你的应用程序. Android调试桥(Android Debug Bridge (adb) )Adb 工具可以让你在模拟器或设备上安装应用程序的.apk文件,并从命令行访问模拟器或设备.你也可以用它把Android模

Error building Player: Win32Exception: ApplicationName=&amp;#39;E:/adt-20140702/sdk\tools\zipalign.exe&amp;#39;, Com

1.原因 更新sdk后报错..由于版本号不同,zipalign.exe所处路径不同 2.解决的方法 在sdk路径下搜索zipalign.exe .然后拷贝到报错内容中制定的路径即可了. Error building Player: Win32Exception: ApplicationName='E:/adt-20140702/sdk\tools\zipalign.exe', Com

Error building Player: Win32Exception: ApplicationName=‘xxxxxxxxxxxxxxxxxx//sdk\tools\zipalign.exe&#39; , CommandLine=&#39;4 的解决办法

更新了安卓SDK后,有时候Unity编译失失败,报错类似 Error building Player: Win32Exception: ApplicationName='D:/Program Files/adt-bundle-windows-x86_64-20140702/sdk\tools\zipalign.exe', CommandLine='4 "XXXXX\Temp/StagingArea/Package_unaligned.apk" "XXXXX\Temp/Stag

安装 VS 2015 Update 2 + Windows SDK Tools 1.3.1 + Windows SDK 10586.212 后提示找不到 10586.0 SDK 问题的解决方法

将 Visual Studio 2015 升级到 Update 2,并安装 Windows SDK Tools 1.3.1 和 Windows SDK 10586.212 后,有可能造成原本已安装的 10586.15 SDK 损坏,导致 Visual Studio 2015 在新建或打开使用了 10586.15 SDK 的项目时提示以下错误: The project requires a platform SDK (UAP, Version=10.0.10586.0) that is not i

Error building Player: Win32Exception: ApplicationName=&#39;E:/adt-20140702/sdk\tools\zipalign.exe&#39;, Com

1.原因 更新sdk后报错,,因为版本不同,zipalign.exe所处路径不同 2.解决办法 在sdk路径下搜索zipalign.exe .然后复制到报错内容中制定的路径就行了. Error building Player: Win32Exception: ApplicationName='E:/adt-20140702/sdk\tools\zipalign.exe', Com

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: C:\Users\Administrator\AppData\Local\Android\sdk\tools\templates\gradle\wrapper

在Windows7上运行 “cordova build Android” 报错,如下: C:\test\hello> cordova build androidANDROID_HOME=C:\Users\administrator\AppData\Local\Android\sdkJAVA_HOME=C:\Program Files\Java\jdk1.8.0_121Error: Could not find gradle wrapper within Android SDK. Might ne

自动批改android模拟器的imei的小程序 和 下载各个版本SDK Tools及ADT

ADT 22.6.0版本的下载路径是:http://dl.google.com/android/ADT-22.6.0.zip ADT22.6.1版本的下载路径是:http://dl.google.com/android/ADT-22.6.1.zip SDK Tools r22.6版本的下载路径是:http://dl.google.com/android/android-sdk_r22.6-windows.zip SDK Tools r22.6.1版本的下载路径是:http://dl.google