Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2015 diagnostic tools failed unexpectedly

I try to run diagnostic tools in Visual Studio 2015 Community for a test project.

My code:

#include<iostream>

int main()
{
  for (;;)
  {
    std::cout << "Hello, World!";
    getchar();
  }
  return 0;
}

I use x64 platform in configuration Debug. The Window Diagnostic Tools fail unexpectedly, saying the following:

The diagnostic tools failed unexpectedly. The Diagnostic Hub output in the Output window may contain additional information.

Image1

Diagnostic Hub:

The scratch directory cannot have a trailing junction point.

What does it mean? How do I correct this error?

Image2

like image 364
EKutia Avatar asked Aug 27 '15 10:08

EKutia


2 Answers

It's complaining that the "scratch directory" isn't actually a directory but some kind of reparse point. Reparse points are used to implement various NTFS file system features, notably junction points and symbolic links.

I'm not sure which directory the scratch directory is supposed to be, but my guess is that it's your TEMP directory (normally something like C:\Users\ROSSRI~1\AppData\Local\Temp) and you've done something like moved it to another drive using a junction point or symbolic link. You can check to see if your TEMP directory isn't really a directory by entering the following command in the Windows command prompt:

for /d %i in ("%TEMP%") do @echo %~ai

If it prints d-------- then it's a normal directory, but if it prints d-------l then it's a junction point.

Assuming I'm correct the solution would be either to move the TEMP directory back or point the TEMP and TMP environment variables to the location where you moved it.

like image 161
Ross Ridge Avatar answered Nov 18 '22 18:11

Ross Ridge


Just :) restart your computer (yes nothing else helped me).

like image 35
Ronen Avatar answered Nov 18 '22 17:11

Ronen