Adding a shared configuration file to all projects within a solution in Visual Studio 2008

I have a C # solution in Visual Studio 2008. I added a configuration file (called configuration.xml) to the "Solution Elements" of the solution.

The idea is to have this file copied to each Project debug / release directory after the build. How can I achieve this?

+3
source share
2 answers

In the post build phase, add the following line for each of your projects

copy /Y $(SolutionDir)/configuration.xml $(ProjectDir)

If your configuration file is in the solution subdirectory, you should add it to the original path, of course.

+4
source

(. ). , -build.

+1

Source: https://habr.com/ru/post/1779203/


All Articles