Creating the Setup Program
Creating the Setup Program

As an application developer, you should provide your users with a Windows Installer (MSI) file for your application. An MSI file installs your application assembly into the global assembly cache (GAC) and adds an entry to Add or Remove Programs in Control Panel that enables the user to uninstall the application easily.

The following procedure describes how to create a Visual Studio solution that generates an MSI file for your application. For more information about Visual Studio solutions, see Managing Solutions, Projects, and Files on the MSDN Web site.

  1. Start Microsoft Visual Studio 2005.
  2. On the File menu, point to Open, and then click Project/Solution.
  3. In the Open Project dialog box, browse to the Windows Media Center add-in project file (*.sln or *.csproj), and then click Open.
  4. On the File menu, point to Add, and then click New Project.
  5. In the Add New Project dialog box, in the Project Types pane select Setup and Deployment Projects, then in the Templates pane select Setup Project, and then click OK.
  6. In the Solution Explorer pane, select your project.
  7. On the View menu, click Property Pages.
  8. In the Property Pages dialog box, select All Configurations from the Configuration drop-down list box, and then click the Configuration Manager button.
  9. In the Configuration Manager dialog box, select the Build check box for the new setup project, click Close, and then click OK to close the Property Pages dialog box.
  10. In the Solution Explorer pane, right-click the name of your setup project, point to View, and then click File System.
  11. In the File System pane, select File System on Target Machine, and then on the Action menu, point to Add Special Folder, and then click Global Assembly Cache Folder.
  12. Select the Global Assembly Cache Folder in the File System pane, and then on the Action menu, point to Add and click Project Output.
  13. In the Add Project Output Group dialog box, select the add-in from the Project drop-down list, select Primary output, and then click OK.
  14. In the Solution Explorer pane, right-click the name of your setup project, point to View, and then click Registry.
  15. Add the registry keys and values necessary to register your application with Windows Media Center. For more information, see Associating Application Entry Points with Integration Locations.
  16. In the Solution Explorer pane, expand your project node, expand the Detected Dependencies node, and then right-click each item under the Detected Dependencies node and click Exclude.

    Note   When building a setup package for a Windows Media Center application in Visual Studio 2005, it is possible to inadvertently include assemblies inside the setup package that are only intended to be listed as references. Windows Media Center applications should not include external assemblies that are part of other products in the setup package. To ensure that your setup package does not include external assemblies, verify that each assembly included in the list of detected dependencies in your Windows Media Center application project in Visual Studio 2005 has the Exclude property set to true. For more information, see How to: Exclude Items from a Deployment Project.

  17. Build the solution.

See Also

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View