Search code examples
.netgacfxcoparcgis

FxCop analysis not finding indirectly-referenced assemblies - GAC issue?


I am running my DLL against FxCop and it is returning problems as seen in the image here (It also complains about System.Windows.Browser and System.Core, same versions):

Indirect Assembly issue

I have told FxCop to search the GAC and it isn't helping. I do have System.Runtime.Serialization referenced in my project but it is showing as version 4.0.0.0. I do not see this particular version of the file anywhere.

Although I can skip it means it fails when I use FxCop Integrator in Visual Studio and I don't know what would happen if I tried to integrate into a automatic build.

But more to the point I am curious as to how you fix it as I don't like not understanding whats wrong.


Solution

  • BCL DLLs with version 2.0.5.0 are part of Silverlight 4, which you presumably have not installed on your dev machine. Since you are presumably making no use of the parts of the Esri.ArgGIS.Client.dll assembly that target Silverlight, you could probably safely ignore the warning.

    There seems to be an open issue for FxCop Integrator regarding this problem, so you have three basic choices:

    1. Keep things as-is and hope that an option for ignoring these warnings will be introduced in FxCop Integrator reasonably soon,
    2. Stop using FxCop Integrator, or
    3. Install Silverlight 4.

    For automated builds, the behaviour will depend on your build platform. Instead of trying to guess what might happen in an automatic build, why don't you go ahead and try it?