title: Install method not being called in c# install project
body: <p>I am working through an <a href="http://msdn.microsoft.com/en-us/library/49b92ztk%28v=VS.90%29.aspx#Y1200" rel="nofollow">msdn example</a> in VS08 on how to create a custom installer and I have followed it to the letter. The only change I made was that I implemented the code in C# instead of VB. It compiles without any errors and appears to install, but the overridden install method is not being called and therefore, nothing is being "installed."</p>
  
  <p>From what I have read online while researching this problem, I have discovered that some people have had problems getting their uninstall method to be called, but their install method works fine. I decided to follow through on some of those suggestions thinking it might inadvertently help me, so my code is a little more flushed out than the msdn example, but none of the overridden functions at the bottom of my code are being called. </p>
  
  <p>I have paid close attention to detail, but because of the seeming absence of documentation on this problem, I feel like I must be missing something simple. My code for the class library is below.</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Reflection;
  using System.Configuration;
  using System.Data.SqlClient;
  using System.Collections;
  using System.Configuration.Install;
  
  
  namespace DBCustomAction
  {
     public partial class CsDeployInstaller : Installer
     {
        public CsDeployInstaller()
        {
           InitializeComponent();
        }
  
        private string GetSql(string Name)
        {
           try
           {
              Assembly asm = Assembly.GetExecutingAssembly();
              Stream strm = asm.GetManifestResourceStream(asm.GetName().Name + "." + Name);
              StreamReader reader = new StreamReader(strm, System.Text.Encoding.Default);
              // System.Text.Encoding.ASCII;                  
              return reader.ReadToEnd();
           }
           catch (Exception ex)
           {
              Console.Write("In GetSql:" + ex.Message);
              throw ex;
           }
        }
  
        private void ExecuteSql(string DataBaseName, string Sql)
        {
           string ConnectionString = ConfigurationManager.ConnectionStrings["masterConnectionString"].ToString();             
           //string ConnectionString = @"Data Source=.\sqlexpress;Initial Catalog=master;Integrated Security=True";
           SqlConnection sqlConnection1 = new SqlConnection(ConnectionString);
           System.Data.SqlClient.SqlCommand Command = new System.Data.SqlClient.SqlCommand(Sql, sqlConnection1);
           Command.Connection.Open();
           Command.Connection.ChangeDatabase(DataBaseName);
  
           try
           {
              Command.ExecuteNonQuery();
           }
           finally
           {
              Command.Connection.Close();
           }
        }
  
        protected void AddDBTable(string strDBName)
        {
           try
           {
              ExecuteSql("master", "CREATE DATABASE " + strDBName);
              ExecuteSql(strDBName, GetSql("sql.txt"));
           }
           catch (Exception ex)
           {
              Console.WriteLine("In exception handler:" + ex.Message);
           }
        }
  
        public override void Install(IDictionary stateSaver)
        {
           Console.WriteLine("Install is working");
           base.Install(stateSaver);
  
           AddDBTable(this.Context.Parameters["dbname"]);
        }
  
        public override void Uninstall(IDictionary savedState)
        {
           Console.WriteLine("I am uninstalling this");
           base.Uninstall(savedState);
        }
  
        public override void Commit(IDictionary savedState)
        {
           Console.WriteLine("Commit Function");
           base.Commit(savedState);
        }
  
        public override void Rollback(IDictionary savedState)
        {
           Console.WriteLine("rollback works!");
           base.Rollback(savedState);
        }
     }
  }
  </code></pre>
  
  <p>None of the Console.WriteLine commands ever get called. Just for fun, I also ran a trace to detect if the database was even being acknowledged by the installer and there was nothing. </p>
  
  <p>Any help would be greatly appreciated! </p>