title: How to add optional-components to Visual Studio Setup and Deployment projects?
body: <p>I'm trying to create a very basic "Setup and Deployment" project using Visual Studio.
  What I would like is the ability to choose which <em>components</em> to install. Let's say that each component consists in the primary output of a single class library (i.e. each component is actually a single module or compiled assembly).</p>
  
  <p>I haven't seen such an option in the standard set of available dialogs. But I have seen that with a little effort we can somehow create <a href="http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx" rel="nofollow noreferrer" title="custom dialogs">custom dialogs</a>.</p>
  
  <ul>
  <li><p><strong>How can I programmatically detect which component are available as part of the setup and deployment project?</strong> (i.e. I would like the project to work even when adding or removing a component from the installation)</p></li>
  <li><p><strong>How do I extend or create a custom dialog that displays the list of available components?</strong> </p></li>
  <li><p><strong>How do I detect which components the end-user has choosen to install?</strong> </p></li>
  </ul>
  
  <p>I'm somewhat familiar with Orca, the tool to manipulate .msi files as well as full blown installer applications like InstallShield, but I would like to make this using only raw Visual Studio and other available open-source tools.</p>
  
  <p>Thanks for your help.</p>