Running Xaml FXCop rules in FXCop GUI


So one of the uses of the XamlToolkit is to write FXCop rules for XAML. We provide the Microsoft.Tools.Xaml.FxCop.dll which has some inbuilt XAML rules that you can try out. You could also write new ones by referencing this dll. 

One of the queries I got in response to my previous post was how do i get the rules running. So here go the steps 

Step1: Install FxCop

Step2: Update FxCop.exe.config (this is located at %ProgramFiles(x86)%\ Microsoft FxCop 1.36) to run on .NET 4

Add the following at the bottom of the file just before the </configuration> tag

<startup>

   <supportedRuntime version=”v4.0″/>

</startup>

 

Step3: Open FxCop.exe (this is located at %ProgramFiles(x86)%\ Microsoft FxCop 1.36)

Step 4: Load the FxCop rules dll (if you havent created your own you could load the Microsoft.Xaml.Tools.FxCop.dll)

 

Step 5: Load the targets\Project assembly

Step 6: You are all set. Click the Analyze button and you should see the results of running the rules

Share this post
Comments (2)

  1. Daniel Rose says:

    When will you support FxCop 10.0?

  2. Lester says:

    Thanks for the feedback. We are currently looking into this.

Skip to main content