How to fix “Internal Diagnostics Hub Exception” in VS 2015 - missing DiagnosticsHub.CpuSamplingAnalyzer.dll

1

I've just installed VS 2015 Community Edition on a new laptop w. Windows 10, and to begin with it worked fine, but then it started notifying me about

"Internal Diagnostics Hub Exception. See log for more details."

...every time I started the debugger.

As suggested in How to fix "Internal Diagnostics Hub Exception" in VS 2015 Update 1? I enabled logging, and I found this Error-entry:

Error --- datawarehouse.cpp --- Error loading analyzer (0x8007007e): C:\Users\xxx\AppData\Local\assembly\dl3\HH5W5WAT.7JJ\23M53DB9.DG4\085d63d2\0070979a_f1cad101\amd64\DiagnosticsHub.CpuSamplingAnalyzer.dll.

...but Im not sure how to deal with a missing DiagnosticsHub.CpuSamplingAnalyzer.dll? Any suggestions?

(by the way, I have an Intel CPU, not AMD)

visual-studio-2015
diagnostics-hub
asked on Stack Overflow Jul 25, 2016 by thomas a. h. • edited May 23, 2017 by Community

1 Answer

1

TLDR;

The cause of this is a missing DLL being loaded from a temp location where it may not exist anymore (presumably deleted by update or something.)

You can temporarily fix it as follows in this case:

  1. Enable logging in registry as documented in another answer.
  2. Find path for DiagnosticsHub.CpuSamplingAnalyzer.dll where it is being attempted to be loaded from in log file "Microsoft.VsHub.Server.HttpHostx64.DiagnosticsHub.DataWarehouse.{some number}.log"
  3. Find location of DiagnosticsHub.CpuSamplingAnalyzer.dll on your system (using a tool such as Everything.exe is suggested.)
  4. Copy the assembly to the folder previously found, creating folders as required.
  5. Problem should be resolved.
  6. Disable logging again.

However in my experience the problem comes back due to the temporary nature of the folder involved.

What fixed it properly for me was installing TypeScript into VS2015, from here, based on other answers.

Long answer

The different cause for this error being that the system is trying to load an assembly (DiagnosticsHub.CpuSamplingAnalyzer.dll) from a (temporary) location where it doesn't exist.

If you enable logging as mentioned in another answer above, you will see in the generated log file named "Microsoft.VsHub.Server.HttpHostx64.DiagnosticsHub.DataWarehouse.{some number}.log", a line of the form:

Error --- datawarehouse.cpp --- Error loading analyzer (0x8007007e): C:\Users\{your username}\AppData\Local\assembly\dl3\TDB857L9.5GZ\MEE1D8QG.O32\5171b53e\0070979a_f1cad101\amd64\DiagnosticsHub.CpuSamplingAnalyzer.dll.

As the file does not exist in the temp folder location where the assembly is being attempted to be loaded from (anymore, this appearing to be some kind of temp folder...) the error is thus generated.

On my system, this assembly is actually found here (found using Everything, searching for "DiagnosticsHub.CpuSamplingAnalyzer.dll"):

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Platform\CPUSampling\x86\DiagnosticsHub.CpuSamplingAnalyzer.dll"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Platform\CPUSampling\amd64\DiagnosticsHub.CpuSamplingAnalyzer.dll"

A scan through the registry revealed no link to the temp folder, so I assume it must be referenced in a VS config (?) file somewhere. A brief further attempt at locating this reference in .config files found nothing, so I gave up and resorted to fixing this from the other side, e.g. by copying the required x64 assembly to the path mentioned in the log file.

This fixed this particular cause of the problem for me.

After the fix, the VS error stopped, and the log file logged as follows:

Info --- datawarehousehost.cpp --- DataWarehouse constructed for session: {cafe6fff-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Info --- datawarehouse.cpp --- Loading analyzer {dca8b3ef-xxxx-xxxx-xxxx-xxxxxxxxxxxx} from C:\Users\<user>\AppData\Local\assembly\dl3\TDB857L9.5GZ\MEE1D8QG.O32\5171b53e\0070979a_f1cad101\amd64\DiagnosticsHub.CpuSamplingAnalyzer.dll.
Info --- datawarehousehost.cpp --- Analyzer ({dca8b3ef-xxxx-xxxx-xxxx-xxxxxxxxxxxx}) constructed for session: {cafe6fff-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Debug --- datawarehouse.cpp --- Loading a default analyzer: {66edddf1-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

Edit: However this fix turned out to be only temporary and a more permanent fix was found to be installing TypeScript into VS 2015.

answered on Stack Overflow May 21, 2020 by W.Prins • edited May 27, 2020 by W.Prins

User contributions licensed under CC BY-SA 3.0