title: Get rid of Dependancy on App.config in Data Source
body: <p>I made the huge mistake of "trying out" the data sources in VS2008. I had a load of fields on the form I needed to populate and figured in this one case I'd do a data source so that I could drag and drop the columns into the form.</p>
  
  <p>All works ok.. however, I had to fiddle with the Designer of my data source to override the connection string (we use our own encrypted strings)</p>
  
  <pre><code>        &lt;Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
       Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")&gt;  _
      Private Sub InitConnection()
          Me._connection = New Global.System.Data.SqlClient.SqlConnection()
          ' ** Override default designer settings - get conn string from CORE **
          Me._connection.ConnectionString = Core.DBManager.ConnectionString
      End Sub
  </code></pre>
  
  <p>Again, this works. It's a bit of a pain as I have to override it any time the data source changes.</p>
  
  <p>Now onto the main issue. I want UAC compatibility and the <em>only</em> thing preventing this is the connection string setting which the Data Source automatically creates for itself (even though I have over ridden it and am not using it!). App.config tries to create itself in the install dir in program files so the app wont' even launch on a UAC machine. I don't want to look into moving app.config anywhere as that isn't the solution since the config isn't' even needed.</p>
  
  <p>I can't see a way to get rid of this dependency.. I don't even need or want the connection string in my app.settings as I use my own internal one as per above code sample.</p>
  
  <p><img src="https://i.stack.imgur.com/uAynR.png" alt="Data source connection pointing to (unused!) app.config setting"></p>
  
  <p><img src="https://i.stack.imgur.com/uMRUj.png" alt="The setting I really want rid of"></p>
  
  <p>Deleting the setting messes up the data source at design time - you can no longer edit it until you put the setting back in.</p>
  
  <p>Removing the data source approach and doing it manually as I do everywhere else isn't currently an option due to time constraints.</p>