Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The version of clr.dll in the target does not match the one mscordacwks.dll was built for

I am working in an ASP.NET MVC 3 application using the .NET framework 4.0. When I go to debug my application, i get the message:

"Unable to attach to application 'webdev.webserver.... The version of clr.dll in the target does not match the one mcordacwks.dll was built for.

Do you want to continue anyways?"

I have Windows 7, fully updated. I have repaired and uninstall/reinstall visual studio 2010 and repaired the .NET Framework 4. I am using VS 2010 ultimate. The application is ASP.NET, MVC, .NET 4, Linq to SQL, and ADO.NET entities, and TFS.

I have not changed anything in the project nor changed anything on my system. The only thing I have done is update my computer. I have tried creating a blank project and get the same message. I cannot debug unit tests either without crashing. I have no clue what is going on!

like image 425
sharpper Avatar asked Apr 25 '11 23:04

sharpper


2 Answers

Just had this issue and simply restarting Visual Studio fixed it for me.

like image 188
Carra Avatar answered Oct 04 '22 02:10

Carra


I have finally solved this!

It seemed to have happened after I updated my Windows 7. One of my files must have been out of date.

The fix: Install VS 2010 Service Pack 1: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5

Worked correctly right after I installed. Hitting breakpoints and everything!

like image 20
sharpper Avatar answered Oct 04 '22 01:10

sharpper