Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Visual Studio's default build output path

Are there any good reasons to modify your project's build output path from its default of "bin\debug"? Is there any benefit to pointing all your projects within a solution to a common build output location?

like image 608
JC. Avatar asked Apr 08 '10 22:04

JC.


People also ask

What is an output directory?

output directory. [ESRI software] In ArcIMS, the folder designated during installation to hold files being served to users for display in a browser.

What does Copy to Output directory do?

"Copy to Output Directory" is the property of the files within a Visual Studio project, which defines if the file will be copied to the project's built path as it is. Coping the file as it is allows us to use relative path to files within the project.

Which of the following target creates an output folder for storing the files generated during the?

The root of the uncompressed files tree is formed by a subfolder called Target System in the package's output folder; this corresponds to the Target System root node on the Files and folders project page. The other folders are created under the Target System subfolder.


1 Answers

Yes, I typically do this all the time. As Harry said, it reduces disk space usage. That really is not a big deal to me, since disk space is incredibly cheap, but it might be a concern for you. The real reason I do it it to better mirror what the deployment will look like. The best way to do this is to have a property sheet which modifies the output directory to $(SolutionDir)/build/bin. After this, I set the working directory to $(SolutionDir)/build, which is the whole structure which is identical to what would be deployed, rather than having it spread out among the various project directories.

build
|-- bin
|   |-- foo.exe
|   |-- libfoo.dll
|   `-- libbar.dll
|-- plugins
|   |-- extender.py
|   `-- something.lua
`-- skins
    |-- default.skin
    `-- white-and-gold.skin

Overall, having an isolated directory for things that are built (rather than sources) is a good thing. It eases writing custom build steps, since you know where the ultimate output will be and eases integration with your version control system, since you can just set it to ignore that whole directory, rather than going around setting ignore for all .exe, .lib, .so, .dll and whatever for every little directory.

like image 147
Travis Gockel Avatar answered Sep 17 '22 12:09

Travis Gockel