|DataDirectory| in Project properties > Settings
<p>The connection string setting is below:</p>

<blockquote>
  <p>Name:
  dbPersonConnectionString</p>
  
  <p>Type: 
  Connection string
  Scope: 
  Application</p>
  
  <p>Value:
  Data Source=|DataDirectory|\dbPerson.sdf</p>
</blockquote>

<p>When I install &amp; run the application, it looks for DB in C:\MyApp\Data\ folder. It should be C:\MyApp without additional \Data folder.</p>

<p>Should I simply create Data folder in my project and move DB files under that folder or I simply adjust |DataDirectory| -and how-?</p>

<p>EDIT:</p>

<pre><code>        string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
        string path = (System.IO.Path.GetDirectoryName(executable));
        AppDomain.CurrentDomain.SetData("DataDirectory",path);
</code></pre>
