The version of clr.dll does not match the one msco

2019-01-31 21:55发布

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.

11条回答
在下西门庆
2楼-- · 2019-01-31 22:09

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.

查看更多
萌系小妹纸
3楼-- · 2019-01-31 22:10

This happens, when you do a WINDOWS UPDATE and haven't rebooted your system and the update isn't compatible with VISUAL STUDIO. So in order to solve this, just do an update on VISUAL STUDIO to latest. That should FIX it

查看更多
Luminary・发光体
4楼-- · 2019-01-31 22:13

I had this weird issue after installing .net framework 4.5, when using .net 4 for my project. updating VS 2010 service pack didn't solve this, only removal of .net 4.5 and 4, and then reinstalling .net 4 only.

查看更多
beautiful°
5楼-- · 2019-01-31 22:14

I have VS2013 on Win7 and restarting VS worked for me. Seems it is a VS/CLR bug.

查看更多
淡お忘
6楼-- · 2019-01-31 22:18

I also updated to Service Pack 1, and made sure Windows updates were up to date, but I was still having the same issue:

"The Version of CLR.dll in the target does not match the one mscordacwks.dll was built for."

Microsoft closed this issue on connect.microsoft.com as not reproducible... Unforgivable, irresponsible support system!!

But on social.msdn.com I was directed to upgrade through this link, and this has resolved the problem in my machine ( Win7,VS2010,target 4.0)

Hope it helps.

查看更多
时光不老,我们不散
7楼-- · 2019-01-31 22:21

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.

查看更多
登录 后发表回答