Tuesday, August 19, 2014

Why Visual Studio 2010 closes itself without loading the UI when we launch devenv.exe

On a fine day, I could see that my Visual Studio stopped loading up, when I try to start VS IDE. It shows the splash screen for some seconds and then popup an alert dialog as below and exit itself.

The 'Microsoft.VisualStudio.TeamFoundation.PowerTools.TfptPackage, Microsoft.VisualStudio.TeamFoundation.PowerTools, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\<user>\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'.

I could see that the devenv.exe process is not present after the alert box. As usual first option I tried was restarting the machine. But that didn't help me.

Then I uninstalled the VS 2010 team foundation power tools as its mentioned in the message. Restarted machine. Still no improvement. Then I tried running VS in safemode to make sure none of the plug-ins are getting loaded which might caused error while loading. No luck.

After the above step I understood that its something complicated and I need to run the Visual Studio with logging enabled so that I can examine the log. After running with log enabled, I was able to see the below suspicious entry in the log file.

    <time>2014/08/08 18:11:33.997</time>
    <description>The CTM file is out of date and should be deleted and rebuilt, but the file &apos;C:\ProgramData\Microsoft\VisualStudio\10.0\1033\devenv.CTM&apos; could not be deleted.</description>

What is this CTM file? I did some google and got some links to fix it. But unfortunately nothing worked out.

I had to spent half day to reach this point. There was no benefit researching on this as its taking my productive time. So decided to re-install Visual Studio. Then the next issue started. I am using VS 2010 Ultimate and the infrastructure team in my office don't have the DVD as the license is with client. So finally settled in installing VS 2012 Pro in my machine. I had to agree on that as VS is my tool. That day went smooth with VS 2012.

On next day out of curiosity, I tried to launch VS 2010 and surprisingly it worked. Still this time, its a wonder for me.

No comments: