Home arrow C# arrow Page 8 - Creating a .NET Windows Installer Part 1
C#

Creating a .NET Windows Installer Part 1


In this article, Matthew MacDonald considers how to use VS.NET to build a simple setup program for a .NET desktop application.

Author Info:
By: Wrox Team
Rating: 4 stars4 stars4 stars4 stars4 stars / 118
March 06, 2003
TABLE OF CONTENTS:
  1. · Creating a .NET Windows Installer Part 1
  2. · Article
  3. · Introducing the Windows Installer Service
  4. · The Sample Project
  5. · Creating the Windows Installer Project
  6. · The Setup Designers
  7. · Adding Files, Project Outputs, and Shortcuts
  8. · Support Files and Project Outputs
  9. · Shortcuts
  10. · Customizing the User Interface
  11. · Abstract
  12. · Article
  13. · Introducing the Windows Installer Service
  14. · The Sample Project

print this article
SEARCH DEVARTICLES

Creating a .NET Windows Installer Part 1 - Support Files and Project Outputs
(Page 8 of 14 )

Support Files

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.

Project Outputs

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.


blog comments powered by Disqus
C# ARTICLES

- Introduction to Objects and Classes in C#, P...
- Visual C#.NET, Part 1: Introduction to Progr...
- C# - An Introduction
- Hotmail Exposed: Access Hotmail using C#
- Razor Sharp C#
- Introduction to Objects and Classes in C#
- Making Your Code CLS Compliant
- Programming with MySQL and .NET Technologies
- Socket Programming in C# - Part II
- Socket Programming in C# - Part I
- Creational Patterns in C#
- Type Conversions
- Creating Custom Delegates and Events in C#
- Inheritance and Polymorphism
- Understanding Properties in C#

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials