6
votes

I am trying to debug a .Net application running on remote machine from my local dev. machine. I am getting an error saying MSVCP140.dll is missing

Details:

Dev. machine: Visual Studio 2015, Windows 7

Remote machine: Windows Server 2012 R2, Visual Studio Remote Tools for 2015 installed.

On remote machine, I configured the Remote Debugger with "no authentication" and port 4020.

In dev. machine's Visual Studio Attach to Process window, configured as below:

Transport: Remote (no authentication)

Qualifier: remote_machine_name:4020

As I click on Refresh button, it lists remote machine's processes. While on remote machine, the Visual Studio Remote Debugger window shows that user_name connected.

Screenshot of Remote Debugger window

As soon as I attach to the remote machine's process in Visual Studio, it enters into the debug mode, but symbols remain unloaded.

Interestingly, on the remote machine I got an error message: "The program can't start because MSVCP140.dll is missing from your computer.
Try reinstalling the program to fix this problem."

Screenshot of error: MSVCP140.dll is missing

Though, the file MSVCP140.dll exists in the path of msvmon.exe file.

2
Hey, I experienced the same problem. Did you find a solution by now? :)zodo
Didn't get a solution yet. I will post if it resolves.Nagesh Andani
Fine, thx. I'll do the same. ;)zodo

2 Answers

10
votes

I was able to get the Visual Studio 2015 Remote Debugger to work by adding the directory where msvcp140.dll resides on the remote host to the remote host environmental variable "path" variable and restarting the remote debugger on the remote host.

  1. Locate msvcp140.dll on the remote host. For me, there were several copies, and I chose "C:\Program Files\Microsoft Visual Studio 14.0\Remote Tools\DiagnosticsHub\".
  2. Open the Environmental Variables dialog. Control Panel -> System and Security -> System -> Advanced system settings -> Environmental Variables...
  3. In the "System variables" group, select "path" and click Edit...
  4. Add a semicolon to the end and paste the path to msvcp140.dll (C:\Program Files\Microsoft Visual Studio 14.0\Remote Tools\DiagnosticsHub) after the semicolon.
  5. Click OK, click OK, click OK.
  6. If the Visual Studio Remote Debugger is running (check the system tray icons), exit it, then start the Visual Studio Remote Debugger.
0
votes

Check the version of your platform solution (x86 or x64)

Install the C++ Redistributable package matching with your platform and your VS version on your remote machine. Install both packages if not sure. You should not have to restart.