PresentationFramework DLL could not be loaded

送分小仙女□ 提交于 2019-12-25 18:41:44

问题


I am running a TeamCity build which is running FXCop Analysis.
Getting the following error:

[INFO] 2>Project : error : CA0058 : The referenced assembly 'PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be found. 

Now, this error is coming on only one of the machines, and he build is running fine on all remaining ones.

I've checked the following (same on all the machines)

  1. Checked that the assembly is present in GAC
  2. Verified that Visual Studio 2010 and FXCop 10.0 are present on all machines and verified the configuration.

Any idea?


回答1:


Try copying the PresentationFramework.dll file to

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Bin or

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC#\Bin if you are using Visual Studio 2012 now.

How to copy the DLL 1)Open command line and navigate to it like this

C:\Windows\assembly\GAC_MSIL\PresentationFramework\3.0.0.0__31bf3856ad364e35

2) Copy the file to a folder in your C Drive say DLLFiles with this command

copy PresentationFramework.dll C:\DLLFiles

3) Use windows explorer to copy to the Visual Studio folder. If that does not solve it try referencing the DLL in your project.

Hope it works.



来源:https://stackoverflow.com/questions/17991675/presentationframework-dll-could-not-be-loaded

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