How to Build Multiple WPF Executables into a Single Output Folder in Visual Studio?
Hello,
I have a question regarding Visual Studio. I have a solution that contains multiple WPF executable projects. Here's an example:
MyApp -> Generates MyApp.exe
MyApp.DatabaseManager -> Generates MyApp.DatabaseManager.exe
MyApp.DataAccess -> DLL
MyApp.Common -> DLL
Both executable projects reference the same two DLLs. Since they're essentially part of the same application suite, with each executable serving a different responsibility, I'd like to have them built into a single output folder, something like this:
..\Build\
MyApp.exe
MyApp.DatabaseManager.exe
MyApp.DataAccess.dll
MyApp.Common.dll
This would make it much easier to package everything into a single installer.
From what I've tried so far, Visual Studio always generates the output into separate folders, as if each executable were an independent application.
One approach I found would be to create a build script that builds both projects, copies everything into a common folder, and overwrites duplicate files when necessary. However, I'm not sure how reliable or maintainable that approach is.
Is there a way to coordinate this directly within Visual Studio, or is there a better approach that is commonly recommended?