views:

467

answers:

3

FWIW: Windows 7 64bit, Compact Framework v3.5, FxCop v1.36 (running fxcopcmd.exe)

I'm having problems getting FxCop 1.36 to run correctly. I'm analyzing a compact framework application with the globalization rules from http://www.dotneti18n.com/Downloads.aspx

the .exe that i am analyzing has a reference to a 3rd party control suite: resco.outlookcontrols.cf.dll. When fxcop runs and analyzes my app, it blows up saying that it cannot find this assembly. I've checked, re-checked, and check 30 more times that all of the assemblies needed to run the app are in the same folder as the one being analyzed - including the resco dlls.

using fusion log viewer, i'm able to get this information:

LOG: DisplayName = Resco.OutlookControls.CF3, Version=6.7.0.0, Culture=neutral, PublicKeyToken=7444f602060105f9
 (Fully-specified)
LOG: Appbase = file:///D:/Dev/TA/Tools/FxCop/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Dev\TA\Tools\FxCop\fxcopcmd.exe.Config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Resco.OutlookControls.CF3, Version=6.7.0.0, Culture=neutral, PublicKeyToken=7444f602060105f9
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///D:/Dev/TA/Tools/FxCop/Resco.OutlookControls.CF3.DLL.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Resco.OutlookControls.CF3/Resco.OutlookControls.CF3.DLL.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Rules/Resco.OutlookControls.CF3.DLL.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Rules/Resco.OutlookControls.CF3/Resco.OutlookControls.CF3.DLL.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Engines/Introspection/Resco.OutlookControls.CF3.DLL.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Engines/Introspection/Resco.OutlookControls.CF3/Resco.OutlookControls.CF3.DLL.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Resco.OutlookControls.CF3.EXE.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Resco.OutlookControls.CF3/Resco.OutlookControls.CF3.EXE.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Rules/Resco.OutlookControls.CF3.EXE.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Rules/Resco.OutlookControls.CF3/Resco.OutlookControls.CF3.EXE.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Engines/Introspection/Resco.OutlookControls.CF3.EXE.
LOG: Attempting download of new URL file:///D:/Dev/TA/FxCop/Engines/Introspection/Resco.OutlookControls.CF3/Resco.OutlookControls.CF3.EXE.
LOG: All probing URLs attempted and failed.

here's the part that is really frustrating me: the fxcop documentation (here http://msdn.microsoft.com/en-us/library/bb429449%28VS.80%29.aspx ) says that it will load up all referenced assemblies from either the same folder that the analyzed assembly is in, or from a folder referenced by the /directory: command line option.

it's not living up to the documented promises. the file does exist in the same folder as the one being analyzed and i have tried passing the folder in as a /directory: command line option. i've even set the AssemblyReferenceDirectories element in the .fxcop file. yet the only places that are searched, according to the fusion log, are the 'usual' locations for probing.

and fyi - i tried updating the 'probing' settings in the fxcopcmd.exe.config - won't work because the folder of the assembly being analyzed is not under the root folder of the fxcop tool, so it gives me a warning saying it won't be probed.

anyone else have this problem? anyone have a solution?

thanks

A: 

I would concur with Procmon (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) (Tweeted it to you, but not sure if you could see).

It'll show any disk activity of what FxCop is trying to access, and flag if it can't find something. It just pump out a lot of detail, it just takes a bit of time to master the filters and you're away.

Bealer
A: 

Is this CF application compiled using the Any CPU configuration? Is the Resco controls assembly 32-bit only?

I've had problems on an x64 machine with the System.Data.SQLite binary (which is 32-bit) and compiling against Any CPU. The workaround was to change the project to compile using the x86 configuration in Visual Studio instead of Any CPU.

defeated
that seems likely. i'll check on this.
Derick Bailey
We've had such issues, the danger of 'Any CPU' is that it'll always pick x64 if it can.
Bealer
A: 

the problem turned out to be multi-threaded analysis. turning that off for the build server got it working.

Derick Bailey