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)
- Checked that the assembly is present in GAC
- Verified that Visual Studio 2010 and FXCop 10.0 are present on all machines and verified the configuration.
Any idea?
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.