Reputation: 395
I ran into some troubles when creating an installer for my Visual Studio 2010 solution (which has multiple projects) so I thought I'd make a quick guide to how I got it working...
Upvotes: 1
Views: 708
Reputation: 395
Here is how I did it:
Visual Studio Installer project
which is located under
Installed Templates/Other Project Types/Setup and Deployment/Visual Studio Installer.
Add>New Project
From there select Setup Wizard
, give it a name and click OK
A wizard will open, click Next
then select Create a setup for a Windows application
then click Next
again. Select all of the groups you want to include, namely: Content Files, Source Files, Primary Output
Then click Finish
In the solution explorer you will see a bunch of buttons find the one that's tool tip says File System Editor
and click it. You will see three folders in the file system editor, the only one we really care about is the Application Folder
. That folder is where your projects build output should be.
To add files to it if they are not already there right click > Add > File...
Note: You cannot add entire folders (which sucks) and the folder structure in the Application Folder should be identical to that in your projects build.
You should create each folder and then add the files to it.
If you have multiple projects you should set the build directory to the same folder under the release build settings. To do this, open your solution, and for each project, right click/Properties
go to the Compile
tab, set it's configuration to Release
and its Build output path
to some folder (same for each project) (If you have an XNA project make sure its Content Build/Configuration
is also set to Release
).
Now select Release
from the drop down menu on the tool bar (it most likely says Debug
now)
Right click on your solution on the solution explorer and click Build Solution
Now all of your solutions built files will appear in the folder you chose in the compile tab. All of these files are what needs to be added to the Setup Projects Application Folder
(in the same structure)
Customise the installer: click on the project name in the solution explorer and look through it's properties, change what you want (i.e Author, Manufacturer, Title
- these make a difference to the installers output directory and text)
Build the installer project (same way as mentioned above) and you are done.
Feel free to comment with questions
Upvotes: 1