1

I am trying to get FxCop 10 to run analysis on a Windows 8 build computer and seem to have run up against a wall.

When I run it with /verbose against a dll, I get: Could not resolve reference to Windows. Could not load [path to my dll]. The following error was encountered while reading module [name of my module]: Assembly reference cannot be resolved: Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null

I have it pointing to the VS 2012 minimum recommended rules and can get it to run code analysis from visual studio if I set the FxCopCmd.exe.config:

Here is my command line version, which produces the error mentioned above:

fxcopcmd /file:"D:\Source\Project\bin\release\myproject.dll" /out:"D:\temp\fxcop-report.xml" /rs:="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset" /s /assemblyCompareMode:StrongNameIgnoringVersion /searchgac /verbose

I get prompted for Windows, Version 255.255.255.255 if I try to run analysis using the FxCop application as well.

This is a Windows 8 Phone project.

Jeff Zickgraf
  • 177
  • 1
  • 12

1 Answers1

2

Try adding this switch to your FxCopCmd command:

/directory:"C:\Program Files (x86)\Windows Phone Kits\8.0\Windows MetaData"

That worked for me when I met the same error running Visual Studio Code Metrics Powertool for Visual Studio 2013 (metrics.exe).

lirkki
  • 221
  • 1
  • 8
  • I no longer have access to this code base as I have left the company where I had experienced the issue so can't say if this was the answer or not. Sorry. – Jeff Zickgraf May 19 '14 at 20:58