How to debug BizTalkCop rules in Visual Studio 2013

Feb 22, 2016 at 4:53 PM
Edited Feb 29, 2016 at 3:47 PM
In the BizTalkCop.rules project properties, Debug page:
  1. Configure the project to launch an external program and enter in the path to FxCopCmd.exe:
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe
  2. For command line arguments specify:
    /out:"results.xml" /file:"<workspace>\BizTalkCop\Source\BizTalkCop.SampleBad\bin\Debug\BizTalkCop.SampleBad.dll" /rule:"<workspace>\BizTalkCop\Source\BizTalkCop.Rules\bin\Debug\BizTalkCop.Rules.dll" /D:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules" /directory:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies" /directory:"C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2" /directory:"C:\Program Files (x86)\Common Files\Microsoft BizTalk" /ruleSet:"=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets\BizTalkCop.Rules.ruleset"
  3. Set the working directory to the build output folder. For example
    <workspace>\BizTalkCop\Source\BizTalkCop.Rules\bin\Debug
Now you can to debug your BizTalkCop rules by hitting F5 from your BizTalkCop.Rules project.