Completely Uninstall Visual Studio 2010

1

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.

Nick Udell

Posted 2011-03-10T17:34:45.540

Reputation: 159

Answers

2

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.

Marc Reside

Posted 2011-03-10T17:34:45.540

Reputation: 1 484

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 – 2011-03-10T21:12:25.197

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 – 2011-03-10T21:53:41.300

@Nick Udell Found this link which seems to be talking about this same problem you're having. Not sure if that helps.

– Marc Reside – 2011-03-10T22:16:37.160

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 – 2011-03-10T23:32:25.287

Sucks. Sorry to hear that. – Marc Reside – 2011-03-11T00:37:23.327

@Nick Udell I was thinking about this problem last night. Does a folder you create from Linux (with 777 permissions) also show up as read-only in windows? If not, you might be able to use linux to re-create the folder you need for VS. – Marc Reside – 2011-03-11T14:12:46.523

Sadly if I create a folder in Linux it pops up as Read Only in windows. Even at the base of the drive. I think the partitions themselves are propagating these permissions, but changing them doesn't have any effect. – Nick Udell – 2011-03-15T16:33:29.747

FRom http://support.microsoft.com/kb/326549: "Unlike the Read-only attribute for a file, the Read-only attribute for a folder is typically ignored by Windows, Windows components and accessories, and other programs. For example, you can delete, rename, and change a folder with the Read-only attribute by using Windows Explorer."

– Ƭᴇcʜιᴇ007 – 2011-03-17T21:08:18.730

@techie007 we are aware of this. However, the issue at hand has to do with the issue described here: http://itexpertvoice.com/home/fixing-the-windows-7-read-only-folder-blues/ ... this is a problem in Windows 7, and is causing the crashing issue seen by the OP with IntelliTrace in VS 2010.

– Marc Reside – 2011-03-18T12:44:10.273

@Marc Reside: Since noone said they were aware of the fact Windows will always (re)set the folder(s) to 'read-only' by design I figured I'd ensure that info was included. Funny how that Read-Only-Folder-Blues link talks about the 'problem' being that some folders are marked 'read-only', not that they can't use them, just that they're marked 'read-only'. They didn't clarify (nor has the OP) if when Explorer reports them as Read-only in 7, are they check marked Read-only, or are they half-checked (a box in the box) with "(only applies to files in the folder)"? – Ƭᴇcʜιᴇ007 – 2011-03-18T18:20:24.563

@techie007 that's a good question. Since I'm not experiencing this issue myself (no check mark), I can't test that at all. – Marc Reside – 2011-03-18T18:26:43.813

0

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.

Chris O

Posted 2011-03-10T17:34:45.540

Reputation: 279