Friday, March 28, 2014

Getting BizTalkCop working with BizTalk 2010


Thanks to a pointer at ... Madhukar Gilla (biztalk-cop-for-biztalk-2010-and-fxcop-10-0) ... that he'd successfully managed to tweak BizTalkCop (https://biztalkcop.codeplex.com/) to work with BizTalk 2010, I finally got it working ...

As a reminder for me ...
  • Download the latest BizTalkCop source code from Codeplex
  • Install FxCop 10 from the Windows 7.1 SDK
  • Open the solution and change the project target framwork to NET 4.0
  • Change the project reference to ... C:\Program Files (x86)\Microsoft Fxcop 10.0\FxCopSdk.dll
  • Change the project reference to ... C:\Program Files (x86)\Microsoft Fxcop 10.0\Microsoft.Cci.dll
  • Change the post build to ... xcopy "$(TargetPath)" "C:\Program Files (x86)\Microsoft Fxcop 10.0\Rules" /R/Y/Q
  • In FxCop, change the project, options, report style sheet to ... C:\Program Files (x86)\Microsoft Fxcop 10.0\Xml\FxCopReport.xsl
Fingers crossed, you can then use FxCop against BizTalk 2010 bits!

Also be aware that the right clicking on the rule "ApplicationConfig" shows its "Settings" and you need to change those to match your local environment!

And be careful if you try out the BizTalkCop.SampleBad.FxCop in the source code, as it has the BizTalk server setting BIZTEST\DEV01 ... which had me scratching my head for a while, when FxCop keep going on about ... "A network-related or instance-specific error occurred while establishing a connection to SQL Server"

0 Comments:

Post a Comment

<< Home