Visual Studio Debug Error: Unable to Start Debugging

These days I was striking with very annoying issue. Each time when I try to start debugging any Windows solution, my Visual Studio 2008 Professional was giving me the annoying error “Error while trying to run project: Unable to start debugging. The system cannot find the file specified”:

Visual Studio Debugging Error

To my impression, this started happening after installing and reviewing (and then uninstalling) one of the internal Technical Previews of Visual Studio 2010 (and .NET framework 4.0). After that, even reinstalling the frameword and Visual Studio 2008 did not help – the error was (and still is) showing each time after I do Debug. The application was running fine when started with Run.

Web searches showed nothing.

I was almost ready to give up (and reinstall completely my Windows 7 RC!) when a good friend of mine (and brilliant developer himself) advised me to try researching the issue with Process Monitor.

The Process Monitor showed me that VS is trying to create a lot of stuff in places, where it should not (like Program files, for example). Weird, because it’s with last current SP, it should respect that. Obviously something screwed up the logic and now it was doing the wrong things again.

At that point I “remembered” that maybe “Run as administrator” might help. It was helping a lot before releasing of the SP, which made VS compatible with Vista.

I tried “Run as administrator” and… suddenly all went fine. I was able to debug.

Since this workaround resolves my current problem (and I’m almost sure the whole thing is because of screw up from beta version), I will not research more. I wrote this note in case someone strikes with similar issue and (the same as me) forgets to try the “Run as administrator” magic 🙂 .

Leave a Reply

Theme: Overlay by Kaira Extra Text
%d bloggers like this: