我正在用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库。请问是否有人能够帮忙解决这个问题?