public void RunStarted(object automationObject,
                               Dictionary <string, string> replacementsDictionary,
                               WizardRunKind runKind, object[] customParams)
        {
            // Display a form to the user. The form collects
            // input for the custom message.
            inputForm = new WizardForm(automationObject);
            if (inputForm.ShowDialog() != DialogResult.OK)
            {
                throw new WizardCancelledException("Adding the project for Solution Deployment cancelled");
            }

            targetProjects = inputForm.TargetProjects;
            additionalWSPs = inputForm.AdditionalWSPs;

            try
            {
                //// Add custom parameters.
                //replacementsDictionary.Add("$SharePointVersion$", inputForm.SharePointVersion);

                //replacementsDictionary.Add("$ForceSolutionDeployment$", inputForm.ForceSolutionDeployment);
                ////replacementsDictionary.Add("$DeployToAllContentUrls$", inputForm.DeployToAllContentUrls);
                //replacementsDictionary.Add("$OverwriteExistingSolutions$", inputForm.OverwriteExistingSolutions);
                //replacementsDictionary.Add("$AllowGACDeployment$", inputForm.AllowGACDeployment);
                //replacementsDictionary.Add("$AllowCASPolicies$", inputForm.AllowCASPolicies);
                //replacementsDictionary.Add("$DisplayWizards$", inputForm.DisplayWizards);

                //replacementsDictionary.Add("$RestartSPTimer$", inputForm.RestartSPTimer);
                //replacementsDictionary.Add("$RestartSPAdmin$", inputForm.RestartSPAdmin);
                //replacementsDictionary.Add("$RestartSPUserCodeHost$", inputForm.RestartSPUserCodeHost);
                //replacementsDictionary.Add("$RestartIIS$", inputForm.RestartIIS);

                //replacementsDictionary.Add("$MachineName$", Environment.MachineName);

                string debuggingSite = "http://" + Environment.MachineName.ToLower();
                if (automationObject is DTE)
                {
                    debuggingSite = GetDebuggingSite(automationObject as DTE);
                }

                replacementsDictionary.Add("$DebuggingWebApp$", debuggingSite);


                globalDictionary = new Dictionary <string, string>();
                globalDictionary.Add("$custommessage$", customMessage);
            }
            catch { }
        }
    public void RunStarted(object automationObject,
        Dictionary<string, string> replacementsDictionary,
        WizardRunKind runKind, object[] customParams)
    {

      // Display a form to the user. The form collects 
      // input for the custom message.
      inputForm = new WizardForm(automationObject);
      if (inputForm.ShowDialog() != DialogResult.OK)
      {
        throw new WizardCancelledException("Adding the project for Solution Deployment cancelled");
      }

      targetProjects = inputForm.TargetProjects;
      additionalWSPs = inputForm.AdditionalWSPs;

      try
      {
        //// Add custom parameters.
        //replacementsDictionary.Add("$SharePointVersion$", inputForm.SharePointVersion);

        //replacementsDictionary.Add("$ForceSolutionDeployment$", inputForm.ForceSolutionDeployment);
        ////replacementsDictionary.Add("$DeployToAllContentUrls$", inputForm.DeployToAllContentUrls);
        //replacementsDictionary.Add("$OverwriteExistingSolutions$", inputForm.OverwriteExistingSolutions);
        //replacementsDictionary.Add("$AllowGACDeployment$", inputForm.AllowGACDeployment);
        //replacementsDictionary.Add("$AllowCASPolicies$", inputForm.AllowCASPolicies);
        //replacementsDictionary.Add("$DisplayWizards$", inputForm.DisplayWizards);
        
        //replacementsDictionary.Add("$RestartSPTimer$", inputForm.RestartSPTimer);
        //replacementsDictionary.Add("$RestartSPAdmin$", inputForm.RestartSPAdmin);
        //replacementsDictionary.Add("$RestartSPUserCodeHost$", inputForm.RestartSPUserCodeHost);
        //replacementsDictionary.Add("$RestartIIS$", inputForm.RestartIIS);

        //replacementsDictionary.Add("$MachineName$", Environment.MachineName);

        string debuggingSite = "http://" + Environment.MachineName.ToLower();
        if(automationObject is DTE)
        {
          debuggingSite = GetDebuggingSite(automationObject as DTE);
        }
        
        replacementsDictionary.Add("$DebuggingWebApp$", debuggingSite);


        globalDictionary = new Dictionary<string, string>();
        globalDictionary.Add("$custommessage$", customMessage);
      }
      catch { }

    }