locked
Configuration independent build events RRS feed

  • Question

  • Hi everybody,

    I have been hitting a wall with the following issue, and can't find any comments about it either.

    We recently moved to VS2005 with .NET 2.0 and I am working on a solution that uses old C++ projects. VS will not copy the C++ DLL to the dependent target folders, so I have to add post build event copy commands to all the projects that need them. The problem is that VS doesn't allow Configuration independent Build Events. Does anybody know a way around that?

    Thanks,
    Friday, June 8, 2007 4:01 PM

All replies

  • How do you mean - configuration independent build events? Do you want to copy the dlls only for specific configurations?

     

    Cheers, Eugene

    Friday, June 8, 2007 10:11 PM
  • I am guessing that he means a build event that may happen only in Release Mode, but not in Debug Mode or something of this sort.  I would also like to find a way around this.  Has anyone successfully done this?

     

    Thanks

    Thursday, June 14, 2007 9:44 PM
  • I actually just noticed that there is a "Configuration" Macro so you can do:

     

    if $(ConfigurationName) == Release xcopy /e /y dir1  dir2

     

    this will copy directory1 and all sub directories (/e)  without prompting (/y) to directory2 only when your configuration is Release mode.

     

    hope this helps

    Thursday, June 14, 2007 10:04 PM