'multiple exe in bin folder after build solution

Is it possible to produce more than one exe in debug/release folder after we build Windows form solution?

For example I want to produce 2 exes in debug/release folder everytime I build a solution, 1. MyApp.exe 2. MyApp_setup.exe

Thanks



Solution 1:[1]

The \bin\Debug and \bin\Release folders are only defaults and can be changed in your project settings.

enter image description here (Click for larger view)

All you need to do is change it to a relative path to be something both projects can see.

For example, if your folder structure was like

C:\
 Code\
  MyAppSolution\
   MyApp\
   MyApp_Setup\

changing both projects to use ..\CommonBin\Debug\ as their output path would put both exe's in C:\Code\MyAppSolution\CommonBin\Debug\.


However there is a second option also, if you add a reference to the MyApp project to MyApp_Setup when you go to build MyApp_Setup it will put MyApp.exe in the output directory because it considered it a dependency. Just be sure you have Copy Local set to true when you build.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Scott Chamberlain