FxCop无法解析引用

Coo*_*ngs 5 c# fxcop hudson fxcopcmd

我正在使用C#开发项目。现在,我已经设置了Hudson服务器,并且在服务器上安装了.Net 4 Framework和Windows SDK 7.1。

该项目成功构建,但是当我使用以下命令启动FxCop时:

"C:\Program Files (x86)\Microsoft FxCop 1.35\fxcopcmd.exe" /file:CommonServiceTool\bin\Release /out:fxcop-result.xml
Run Code Online (Sandbox Code Playgroud)

它加载所有.dll规则文件,然后发生以下异常:

Using system files at: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319.
Could not resolve reference to PresentationFramework.
Could not resolve reference to PresentationCore.
Could not resolve reference to WindowsBase.
12 exceptions occurred while loading Project1.
   00) Could not resolve type reference: [PresentationFramework]System.Windows.StartupEventArgs.
   01) Could not resolve type reference: [PresentationFramework]System.Windows.Window.
   02) Could not resolve type reference: [PresentationFramework]System.Windows.Controls.HeaderedContentControl.
   03) Could not resolve type reference: [PresentationCore]System.Windows.Input.ICommand.
   04) Could not resolve member reference: System.Windows.ThemeInfoAttribute::.ctor.

... and so on...
Run Code Online (Sandbox Code Playgroud)

我在项目中使用WPF,我认为FxCop找不到WPF库。有人可以帮我吗?

akt*_*ton 4

确保项目 -> 选项... - 拼写和分析 -> “搜索全局程序集缓存以查找丢失的引用”已选中(根据FxCop 和 GAC Madness)。