Tuesday, March 15, 2011

Fixing vshost-clr2.exe has stopped working Error

Sometimes you just want an answer to try and fix the issue.

So if you are getting this when debugging in VS 2010 try the following:

1. Make sure all of your projects are using the same Framework version ( preferrably 4.0 ) as VS 2010 doesnt like mixed mode framework debugging in X64 bit mode.

2. Under your Projects Properties go to Debug tab and Enable Unmanaged Code Debugging.

Enjoy
Qui Jon

1 comments:

  1. wow, i've been fighting this issue for several days now. i've got a managed application hosting preview handlers (unmanaged COM objects implementing the IPreviewHandler interface). I've been able to reliably reproduce this vshost-clr2.exe crash without any clue how to resolve it. the exception always came up after all my user code had executed. do you know why this exception goes away just by enabling unmanaged code debugging? i'm very curious how that affected the behavior.

    thanks loads for posting this answer!

    ReplyDelete