FxCop Integrator using Addinf for Visual Studio 2010 and FxCop 10.0

Dec 4, 2012 at 10:45 AM
Edited Jan 22, 2013 at 9:37 AM

Hi,

I have VS 2010, FxCop 10.0 and I use an Addin for VS2010

In my OnBuildDone build event in Addin, I call fxcopcmd.exe

var rutaFxCopCmd =  @"\FxCopCmd.exe";
var fxcop = new FxCop();           

fxcop.ToolPath = PathFxCop;           
fxcop.SearchGac = true;            
fxcop.Verbose = true;           
fxcop.AnalysisReportFileName = analysisReportFileName;           
fxcop.TargetAssemblies = targetAssemblies;           
fxcop.ProjectFile = fxCopProject;
if (dependencyDirectories != null) fxcop.DependencyDirectories = dependencyDirectories;
bool resultado = fxcop.Execute();


Can I call FxCop integrator in build events in Addin: _buildEvents_OnBuildDone  ?

any suggestions for better error handling?


thx