Unknown build error, 'Could not load file or assembly 'System.Windows

℡╲_俬逩灬. 提交于 2019-12-08 00:21:42

问题


I am trying to build a test project for silverlight application. When i build this project it throws following error

Unknown build error, 'Could not load file or assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

I have system.winwos dll in my references and i am using visual studio 2012.

What should i do to resolve this error

More Details:

If I remove system.windows.control.Navigation dll, this error no longer comes up but build requires system.windows.control.Navigation.


回答1:


Finally found a system.windows version 5.0.5.0 in C:\Program Files (x86)\Microsoft Silverlight\5.1.20913.0 folder

Had to add this file manually in project.csproj file using tag Getting other build errors not but at least the this one is resolved.

Thanks for all your help!




回答2:


Generally when I've had this problem it's because my application is set to build 64-bit rather than AnyCpu and the offending assembly is 32-bit. Or vice versa.



来源:https://stackoverflow.com/questions/21690938/unknown-build-error-could-not-load-file-or-assembly-system-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!