locked
Mixing relative and absolute paths RRS feed

  • Question

  • Hi,

    In FxCop 1.32 you can either have relative paths within a project using the shared project option, or have all paths be absolute.

    I would find it really usefull if there was a way to use both kinds. I want to have relative paths for the assemblies to analyze and absolute paths for any custom rules assemblies.

    Is there a reason why this is not allowed?

    /Johan
    Friday, September 2, 2005 8:55 AM

Answers

  • You should be able to modify your project file manually to get the behavior you want.

    The next version of FxCop actually won't provide two options here. All paths that can be created as relative will be persisted that way, and any paths which must be absolute will be written that way. We will still support the ability to manually modify paths to insert environment variables. This can be done within the FxCop UI by right clicking a rule assembly or a target and selecting 'Properties'. You can modify the path information in the 'Save Name' field to use any environment variables you care to.

    Michael Fanning
    VSTS Development: Code Analysis
    Friday, September 2, 2005 1:38 PM

All replies

  • You should be able to modify your project file manually to get the behavior you want.

    The next version of FxCop actually won't provide two options here. All paths that can be created as relative will be persisted that way, and any paths which must be absolute will be written that way. We will still support the ability to manually modify paths to insert environment variables. This can be done within the FxCop UI by right clicking a rule assembly or a target and selecting 'Properties'. You can modify the path information in the 'Save Name' field to use any environment variables you care to.

    Michael Fanning
    VSTS Development: Code Analysis
    Friday, September 2, 2005 1:38 PM
  • Okey. Looking forward to the next version then.

    I think I've tried to manually edit the FxCop project file in the past but gave up on it because the changes would be lost/break things whenever the project file was saved by the gui.

    /Johan
    Friday, September 2, 2005 1:50 PM
  • If you mix absolute and relative paths, yes, the GUI will blast this information on a project save. If you move to using environment variables to represent absolute paths, this information will not get blown away. The downside, of course, is that you must always launch fxCop from an environment where those env variables are defined.

    Michael

    Friday, September 2, 2005 4:53 PM