Tuesday, December 15, 2009

A fix for: "Attempted to read or write protected memory " in Visual Studio

I got this error after installing the WPF Toolkit and not closing all my Visual Studios before installing. The error was thrown by Visual Studio when I invoked F5 to run my WPF application in debug mode.
In my case the fix was simple:
Goto: Tools - Import and Export Settings - Reset all Settings

5 comments:

Anonymous said...

Thanks man, you're star ... I reinstalled VS2008 before reading your comments, and that didn't solve the problem, however, the issue was fixed when I reset the settings

Ken Blackstein said...

For what its worth - thank you again. I was solving a designer can't create usercontrol occurance when I got the "Attempted..." Absolutlely nothing helped, and I tried EVERYTHING, even some patches to Windows! Then I found your blog post. Man - am I remined of how important it is to share. Be proud.
Kenny

Anonymous said...

it isn't working for me. please is there anything i am missing out?

elLoco said...

Are you sure your settings are reset? If the settings are correctly reset Visual Studio should come up with the question what kind of Developer you are... C#, VB....

Jems Nichole said...

I admire the valuable information you offer in your articles. I will bookmark your site!!
Technical Writing