specifying rules only via a project file

Is it possible to only specify rules for a FXCop project For example, I want to create select the rules I want and save them to a project file, but I don't want to list any assemblies. I would like to specify the project file in a call to fxcopcmd to specify the exact rules, but specify the assemblies via the fxcopcmd arguments. Is this possible


Answer this question

specifying rules only via a project file

  • Paul McKeown

    Yes. You can use a combination of the project and file switches.



    fxcopcmd /project:MyProject.FxCop /file:MyLibrary.dll /out:MyProject.xml

     

    This will cause FxCop to import the rules from MyProject.FxCop, while analyzing MyLibrary.dll.

    You can also specify a directory for FxCop to load the assemblies from by using the file switch:



    fxcopcmd /project:MyProject.FxCop /file:C:\MyAssemblies /out:MyProject.xml

     



  • specifying rules only via a project file