Locked FxCop 1.35 and VS 2005

  • Wednesday, March 15, 2006 8:28 PM
     
     

    Hi all,

    I've got a couple of custom rule libraries here that I need support usage with both FxCop and VS 2005. I understand that I need to compile my rules against the specific FxCop assemblies for each of the two (FxCop assemblies for FxCop GUI, and VS\FxCop to VS 2005 IDE).

    What's the best way to do that? Having to remove and add references so to compile my libraries seems like a big hassle to me (along with having to maintain separate versions of my rule assemblies).

    Any comments are highly appreciated. Thanks!

    Claudio Lassala

All Replies

  • Thursday, March 16, 2006 12:52 AM
    Moderator
     
     Answered

    Claudio,

    Unfortunately, until we improve this (which is in our plans for Orcas), that's the only way you are going to be able do this.

    Although beyond the scope of this forum, you could use the combination of build configurations, MSBuild properties and conditions to make this a painless process to build this within the Visual Studio IDE. Basically what I'm suggesting is that you have a different build configuration which changes the references to point to FxCop 1.35 and another which points to Visual Studio 2005. Although you would still need two versions of your rule assemblies, you only need the one project.

    You might also want to check out a blog entry that we've just posted on adding custom rules to Visual Studio which you might be interested in:

    http://blogs.msdn.com/fxcop/archive/2006/03/11/549611.aspx

  • Friday, March 17, 2006 6:04 PM
     
     

    Hi David,

    Thanks for the information. I'll play around with that.