127

I do not see dumpbin.exe on my system. I have Visual Studio 2005 on my system. When I type dumpbin on the command line, it says unrecognizable command.

Does it come with Visual Studio by default, or do I have to explicitly add this tool?

Ben
  • 54,723
  • 49
  • 178
  • 224

13 Answers13

77

You probably need to open a command prompt with the PATH set up properly. Look for an icon in the start menu that says something like "Visual C++ 2005 Command Prompt". You should be able to run dumpbin (and all the other command line tools) from there.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • 4
    Search for "command prompt" in the start menu, which brings up a selection of command prompts. Look for "Visual C++" or "Developer Studio" command prompts. – JayS Feb 17 '19 at 23:26
63

Visual Studio Commmunity 2017 - dumpbin.exe became available once I installed the C++ profiling tools in Modify menu from the Visual Studio Installer.

enter image description here

Ben
  • 54,723
  • 49
  • 178
  • 224
  • 10
    Works also for VS2019! – Amaury Levé Sep 03 '19 at 15:59
  • 1
    Seconded about VS2019. I did need to use the Developer Command Prompt for VS 2019 to have it automatically loaded found in PATH though. The path that is relevant is `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86`, which can be added to your regular path if desired. – Dusty Vargas Apr 14 '20 at 16:06
  • 3
    With VS 2019, installing `MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.25)` was enough for me to get dumpbin.exe. – 0xced Apr 16 '20 at 06:57
  • 1
    Works also for VS2022! – Jari Turkia Nov 08 '22 at 20:16
  • 1
    I started Visual Studio Installed 2022 and opened Modify/Individual Components, and I could not find the tools category mentioned above. Please help. How to find the `dumpbin.exe` tool? – tarekahf Nov 21 '22 at 22:47
61

A little refresh as for the Visual Studio 2015.

DUMPBIN is being shipped within Common Tools for Visual C++, so be sure to select this feature in the process of installation of Visual Studio. The utility resides at:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\

It become available within Developer Command Prompt for VS 2015, which can be executed from Start Menu:

Visual Studio 2015 \ Visual Studio Tools \ Developer Command Prompt for VS2015

If you want to make it available in the regular command prompt, then add the utility's location to the PATH environment variable on your machine.

enter image description here

Deilan
  • 4,740
  • 3
  • 39
  • 52
  • Not ITT: The gig(s) this option adds ;( I think the standalone builds tools + cmake in 2017 are like, over 1GB just by themselves; that doesn't include anything else, like SDKs or MFC support. – kayleeFrye_onDeck Apr 27 '17 at 22:33
  • Also possible to run DumpBin as an [External Tool](https://stackoverflow.com/questions/45477382/how-to-read-a-obj-file/49669631#49669631). – Laurie Stearn Apr 05 '18 at 10:10
20

By default, it's not in your PATH. You need to use the "Visual Studio 2005 Command Prompt". Alternatively, you can run the vsvars32 batch file, which will set up your environment correctly.

Conveniently, the path to this is stored in the VS80COMNTOOLS environment variable.

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
14

Dumpbin.exe of VS2005 generally presents in C:\Program Files\Microsoft Visual Studio 8\VC\bin. If you would have installed VS2005 in drive other the C, please search in that. And then set that path in the system variable PATH.

rashok
  • 12,790
  • 16
  • 88
  • 100
14

As for VS2017, I found it under C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64

Ezra Steinmetz
  • 1,267
  • 1
  • 17
  • 18
7

Instead of using the dumpin.exe it is possible to call the link.exe with several options:

Example: link /dump /all myfile.lib

For detailed options see output of link /dump

In case of Visual Studio C++ Express installation, the link.exe is located here:

{root}\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\

The best way is to open the "Visual Studio Command Prompt" and then enter the lines above.

Barnee
  • 3,212
  • 8
  • 41
  • 53
Marks
  • 71
  • 1
  • 1
  • 1
    I tried this solution to list the symbols in my lib file and I received the error "The program can't start because mspdb110.dll is missing from your computer. Try reinstalling your program to fix this problem" – fercis Jul 28 '15 at 06:59
  • 1
    @fercis Late answer but... this error message most often means the DLL cannot be found in your current %Path% directories. Try to locate the dll in your system, then update %Path% variable with `set Path=%Path%;Z:\Directory\Directory` (replace Z:\Directory\Directory with correct path of course, the path of the folder containing the DLL not the full path including the DLL name), and try running the command again. – jdarthenay Apr 05 '16 at 08:22
5

In Visual Studio Professional 2017 Version 15.9.13:

  • First, either:

    • launch the "Visual Studio Installer" from the start menu, select your Visual Studio product, and click "Modify",

    or

    • from within Visual Studio go to "Tools" -> "Get Tools and Features..."
  • Then, wait for it while it is "getting things ready..." and being "almost there..."

  • Switch to the "Individual components" tab

  • Scroll down to the "Compilers, build tools, and runtimes" section

  • Check "VC++ 2017 version 15.9 v14.16 latest v141 tools"

like this:

enter image description here

After doing this, you will be blessed with not just one, but a whopping four instances of DUMPBIN:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x86\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\dumpbin.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\dumpbin.exe
Mike Nakis
  • 56,297
  • 11
  • 110
  • 142
  • 1
    I started Visual Studio Installer 2022 and opened Modify/Individual Components, and I could not find the tools category mentioned above. Please help. How to find the `dumpbin.exe` tool? I did not find the exact category mentioned above. Please help. – tarekahf Nov 21 '22 at 22:54
  • @tarekahf sorry, I do not know. Maybe they discontinued it and it does not exist anymore in visual studio 2022. I used 2017 for this. – Mike Nakis Nov 22 '22 at 00:55
  • 1
    thank you. I found it. I was under another section from the main installer windows. I clicked the build tools instead of the community server section. And, the name was changed slightly, and figured it out! – tarekahf Nov 22 '22 at 00:57
2

You can use the Visual Studio command prompt. dumpbin is available then.

anhoppe
  • 4,287
  • 3
  • 46
  • 58
1

Several have recommended such options as running under a Visual Studio Command Prompt and adding the directory that contains dumpbin.exe to the path. While I suppose one could CALL C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\LaunchDevCmd.bat each time you want to execute dumpbin.exe, adding its location to the path is an exercise in futility because it moves with almost every Visual Studio update. Presumably, this allows people to run multiple versions of Visual Studio "side by side," for which their might be a use case or two.

Meanwhile, the rest of us must accommodate its nomadic ways.

David A. Gray
  • 1,039
  • 12
  • 19
1

After installing Visual Studio 2019 Community pack , with VC++ 2019, with this choice:

enter image description here

I've found dumpbin.exe here:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX64\x64\dumpbin.exe

By creating Powershell script dumpbin.ps1,

&"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX64\x64\dumpbin.exe" $args

we can run:

dumpbin.ps1 /exports C:\Windows\System32\kernel32.dll

We get this:

enter image description here

jacouh
  • 8,473
  • 5
  • 32
  • 43
1

You can find it with vswhere

vswhere -latest -find **/dumpbin.exe

It will give you a list of locations where you can find it if you have it installed.

Cesc
  • 904
  • 1
  • 9
  • 17
1

VS2019

  1. Visual Studio: Tools --> Get Tools and Features...
  2. Visual Studio Installer --> Individual Components
  3. Install: MSVC v142 - VS 2019 C++ x64/x86 build tools (Latest)
  4. Visual Studio: Tools --> Command Line --> Developer Command Prompt
  5. Now you can run dumpbin and editbin (without specifying full path)

VS2022

  1. Visual Studio: Tools --> Get Tools and Features...
  2. Visual Studio Installer --> Individual Components
  3. Install: MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
  4. Visual Studio: Tools --> Command Line --> Developer Command Prompt
  5. Now you can run dumpbin and editbin (without specifying full path)
MattGerg
  • 433
  • 4
  • 10