Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have a C# console app in Visual Studio 2010 that I can run just fine. When I attempt to run the process in debug mode, I am presented with the following error:

clr.dll version doesn't match mscordacwks.dll

I have tried searching for any information, but I haven't been able to find anything. Can anyone provide clues as to why I can't run this with the debugger?

EDIT: I should clarify that I have been able to successfully debug a console app previously, this is a new situation.

like image 449
Rebecca Chernoff Avatar asked Apr 24 '11 01:04

Rebecca Chernoff


4 Answers

From what I can tell when I'm able to reproduce this error, it is caused by being in the middle of installing Windows updates. So, running updates, then postponing a reboot, then attempting to debug code is what was putting me in this broken state.

like image 108
Rebecca Chernoff Avatar answered Nov 09 '22 12:11

Rebecca Chernoff


I had this issue once and it was caused by an pending Windows Update on the Server where the process was running, which I wanted to attach.

like image 6
Chris Avatar answered Nov 09 '22 11:11

Chris


I encountered the same issue. It happened to me when I attempted to attach to a process for debugging purposes. At the time I had postponed a pending windows update.

Everything started working fine after I restarted my computer and allowed the update to take place.

Additional notes: I had recently updated to Visual Studio 2010 Ultimate and installed its Service Pack 1.

like image 4
Jeremy Ray Brown Avatar answered Nov 09 '22 11:11

Jeremy Ray Brown


I had this when I installed .NET 4.6 for Visual Studio 2013.

In this particular case, restarting Visual Studio 2013 solved the problem.

like image 4
Contango Avatar answered Nov 09 '22 11:11

Contango