FxCop indirect link to System.Core version 2.0.5.0

I have a project that uses Autofac, and WebAPI integration

We run FxCop on our solution, and when I open autofac, I get the following:

Could not find the following indirect link. This assembly is not required for analysis; however, without it, analysis of the results may not be complete. This assembly was referenced by Autofac.dll

System.Core, Version = 2.0.5.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e, Retargetable = Yes

This results in the following error on our CI server:

FxCop return code (516): PROJECT_LOAD_ERROR ASSEMBLY_REFERENCES_ERROR

Is there any way to tell FxCop to ignore this?

+5
source share
4 answers

AutoMapper 3.1.0 . - FxCop. FxCop 10.0, FxCop Visual Studio 2012 . FxCop 10.0 , :

  • C:\Program Files (x86)\Microsoft Visual Studio 11.0\ \ \FxCop

  • C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\ \FxCop

.

+9

FxCop . Autofac; , Autofac - PCL, . , , , , Windows 8, Windows 7 Server 2008R2 .

, , 2.0.5.0 . Silverlight . "Stuff" . , FxCop .

: FxCop 512?

+3

You must add a link to the assembly directory in the FxCop project file. For instance:

<Targets>
  <AssemblyReferenceDirectories>
   <Directory>C:/Windows/Microsoft.NET/assembly/GAC_MSIL/Microsoft.Web.Infrastructure/v4.0_1.0.0.0__31bf3856ad364e35/</Directory>
   <Directory>C:/Windows/Microsoft.NET/assembly/GAC_MSIL/System.Web.Mvc/v4.0_3.0.0.0__31bf3856ad364e35/</Directory>
  </AssemblyReferenceDirectories> 
+1
source

The workaround for this problem is to copy the missing System.Core.dll to the project output directory. I did this as a postbuild event to copy System.Core.dll from a shared folder to the project \ bin directory. You can get a copy of System.Core.dll from the Silverlight SDK 2 installation.

Now fxcop starts successfully without any problems. Note that I used the Fxcop integrator for Visual Studio 2010.

+1
source

All Articles