Copy task in Visual Studio 2008

Posted by Maurizio Reginelli on Stack Overflow See other posts from Stack Overflow or by Maurizio Reginelli
Published on 2010-02-25T16:26:27Z Indexed on 2010/03/22 21:51 UTC
Read the original article Hit count: 462

This is a question related to a previous question I posted (see here).
I need to configure a .csproj file to copy some files from a directory to another one (let me call them SOURCE and DESTINATION). I also need to change the SOURCE path depending from the configuration I'm using. For example, if I compile my project in Debug mode, the SOURCE path must contain a subfolder called Debug.
I tried the solution proposed by Schmitt in the previous post, using $(ConfigurationName) to set the dynamic directory into the SOURCE path. When I opened the solution containing that project, a list of links to the source files appeared in the main tree of the project and they were correctly related to the Debug mode. But when I changed to the Release mode, I saw that the path of the linked source files were set again to the Debug version.
Is there a way to specify a parameter in the Include attribute of the SourceFiles element?
Thank you.

© Stack Overflow or respective owner

Related posts about visual-studio-2008-sp1

Related posts about visual-studio