The version of clr.dll in the target does not matc

2019-04-03 22:27发布

问题:

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!

回答1:

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



回答2:

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!