我正在使用 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
它加载所有 .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...
我在项目中使用 WPF,我认为 FxCop 找不到 WPF 库。有人可以帮我吗?