title: Getting error in loading Configuration file,Parameter is not valid
body: <p>I have an installer class which is retrieving the parameters from the Visual Studio Setup project.Now on opening the exeConfiguration i am getting following error..</p>
  
  <pre><code>Error 1001:An error occurred loading a configuration file.
  The parameter 'exePath' is       invalid.
  Parameter name:exepath--&gt;The Parameter   'exePath'   is invalid.
  Parameter name:exePath
  </code></pre>
  
  <p>And here is my Installer.cs Code..</p>
  
  <pre><code>public override void Install(System.Collections.IDictionary stateSaver)
      {
  
          base.Install(stateSaver);
  
          string targetDirectory = Context.Parameters["targetdir"];
  
          string param1 = Context.Parameters["Param1"];
  
          string param2 = Context.Parameters["Param2"];
  
          string param3 = Context.Parameters["Param3"];
  
          string exePath = string.Format("{0}TechSoft CallBill.exe", targetDirectory);
  
          Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
  
          config.AppSettings.Settings["Param1"].Value = param1;
  
          config.AppSettings.Settings["Param2"].Value = param2;
  
          config.AppSettings.Settings["Param3"].Value = param3;
  
          config.Save();
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/tbpjD.png" alt="enter image description here"></p>
  
  <p>Please help me to sort out this error As i am not able to figure out.
  Any suggestion is heartily welcomed.
  Thanks in advance </p>