Creating a .NET Windows Installer – Part 1 - Support Files and Project Outputs (Page 8 of 14 )
You can add the files your application uses (like bitmaps, custom data files, and so on) manually. Just right-click on the file list, choose Add File , and browse to the correct file (you can also create any sub-directories you need by choosing Add Folder.) The files you select will be copied to the corresponding location on the target computer.
You should add the main .NET assembly for your application as a project output. This ensures that the file will be automatically regenerated every time you build the setup. It also ensures that the required dependent assemblies will be included. To add the project output for the FontView application, right-click on the Application folder and choose Add Project Output .
This window allows outputs from any project in the current solution. Once you choose the correct project, you can select the type of output.
Primary output adds the assembly built by the referenced project, and any dependent assemblies. This is the most common option. (You can also set the Configuration option to Release .NET to ensure that the setup program always uses the release version of the assembly, regardless of the current IDE settings).
Localized resources uses the satellite assemblies for the project, which contain locale-specific resources.
Source files includes all the text source files for the referenced project. Because these files do not include the actual compiled assembly, dependent assemblies will not be included automatically.
Any dependent assemblies are automatically referenced. In this case, the dependent assembly mscorlib.cfgmscorlib.dll (a core part of the .NET framework) is included.
When you add a .NET assembly, the .NET redistributable files are automatically added to the setup project, allowing you to install your application on computers that don't have the .NET runtime installed. It also balloons the size of your setup project (from about 100K to over 15Mb). If you are creating a setup for clients that already have the .NET framework installed, you should exclude these components to save space. This is the approach taken in the FontViewer example.
Right-click on the dotnetfxredist_x86_enu.msm merge module in the Solution Explorer, and choose Exclude.