Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a bug with visual studio 2010, whenever I try to run my program with debugging enabled it pops up an error message saying "Error While Trying to Run Project: Uncaught exception thrown by method called through Reflection". This happens even on a fresh project, so it's not my code.

I tried uninstalling through the uninstaller and reinstalling but it still breaks.

What steps to I have to take to completely remove or repair all of the files Visual Studio could be relying on that're breaking it?

I'm running Windows 7, with the new Service Pack. I can boot into Ubuntu 10.4 if required, though visual studio is not set to run on that OS.

P.S> I'm aware of http://support.microsoft.com/kb/248697, but it's both for a much older system and the latest OS it even mentions is XP, so I doubt its relevance.

EDIT: Bit more info

If I go into linux and create a new folder (let's call this folder TESTPERMS for now) and I navigate to where that folder is in the terminal and enter ls -l I get this result

drwx------ 1 nick nick       0 2011-03-16 20:08 TESTPERMS

I then enter the command chmod 777 TESTPERMS

I get this result:

drwx------ 1 nick nick       0 2011-03-16 20:08 TESTPERMS

I try sudo chmod 777 TESTPERMS

I get this result:

drwx------ 1 nick nick       0 2011-03-16 20:08 TESTPERMS

Permissions just aren't changing.

EDIT:

OK, well I only managed to fix matters by completely reformatting. I'll leave this open if there's anybody else who gets this issue but I'll no longer be able to test solutions.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I was able to find this with a quick google search (link):

2.4.11.2 Debugger start fails if the IntelliTrace recordings directory is Read-Only

By default, IntelliTrace files are located in the "%ProgramData%\Microsoft Visual
Studio\10.0\TraceDebugging\" directory.  If this directory is made read-only, or the 
directory is changed to a read-only location, an uncaught exception gets raised to the 
user.  "Error while trying to run project: Uncaught exception thrown by method called 
through Reflection."

To resolve this issue:

* Option 1: Modify the permissions of the directory to be writable. 
* Option 2: Change the directory where IntelliTrace recordings are stored.
      o In Visual Studio, open the Options dialog box.
      o Expand the IntelliTrace item in the left pane of the dialog box.
      o Click the Advanced item under IntelliTrace.
      o Change the IntelliTrace recordings directory to one that is not read-only.
      o Click OK.
share|improve this answer
    
The folder is indeed read only, as is the whole Program Data folder. When I try to uncheck read only in explorer it automatically rechecks itself instantly, and I've tried using attrib in the command line with the same effect. Going into options didn't work either, as clicking the "Intellitrace" tab caused it to say "an error occurred loading this property page". I really think just removing the whole thing and reinstalling would be best here. I also attempted setting the permissions of the entire Program Data folder so that it wasn't read only, but some filed were inaccessible so it failed –  Nick Udell Mar 10 '11 at 21:12
    
I also tried giving all users full control using the folder's security options and have tried a chmod 777 in linux. Still the folder sticks to read only and still the problem persists –  Nick Udell Mar 10 '11 at 21:53
    
@Nick Udell Found this link which seems to be talking about this same problem you're having. Not sure if that helps. –  Marc Reside Mar 10 '11 at 22:16
    
Crap, I followed all of their advice, and none of it works. Any folder I create (even on a brand new user account) auto sets itself to read only. Their public folders workaround is impossible for me as the public folders are stored on C:\, which is a 60gig SSD and lacks the space. Seems a fresh install is the only way forwards. –  Nick Udell Mar 10 '11 at 23:32
    
Sucks. Sorry to hear that. –  Marc Reside Mar 11 '11 at 0:37

To fix the problem mentioned in your first paragraph, try installing the release version of Service Pack 1 for VS2010. If that doesn't help, then post your problem to Microsoft Connect.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.