I have a solution in visual studio with 4 projects - 2 windows form applications, a class library and a setup project.
The 2 windows forms applications both reference the class library project.
My setup project includes the primary outputs for both windows forms application, and the detected dependencies include the class library.
I've put one of the primary outputs in the Application Folder, and the other in a sub folder. The problem is that the class library assembly only gets installed in the application folder directory but I also need it in the sub directory, otherwise one of the windows form applications will not run. How can I get it to install in both places? Is it possible to do without manually adding the assembly?
Very easy:
For each setup project that needs to refference some assemblies and use each of them in 2 different locations, create 2 MergeModuleProjects. The first one contains the file system regarding one of the assemby locations, the other one contains the file system regarding the other assembly location. Then the Setup project which you initially had will only refference the 2 MergeModuleProjects. setup project vs merge module projct
Example: Setup1 has the following file system:
Then you replace the structure above with the following one:
Setup1 had the following file system: (none) Setup1 refferences MergeModule1 and MergeModule2 MergeModule1 has the following file system:
MergeModule2 has the following file system: