flux
flux

Reputation: 395

Creating an installer for Visual Studio 2010 solutions (one or more projects)

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

Answers (1)

flux
flux

Reputation: 395

Here is how I did it:

  1. Create a new Visual Studio Installer project which is located under

    Installed Templates/Other Project Types/Setup and Deployment/Visual Studio Installer.

Make sure you add it to you current solution, you can do this by right clicking on the solution name in the solution explorer and clicking Add>New Project

From there select Setup Wizard, give it a name and click OK

  1. 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

  2. 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 Releaseand 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).

  3. 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)

  4. 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)

  5. Build the installer project (same way as mentioned above) and you are done.

Feel free to comment with questions

Upvotes: 1

Related Questions