AppDomain.CurrentDomain.BaseDirectory changes according to the app's target platform <p>I have this path set up as the path to the root dir of the application.<br> It worked perfectly until I decided to change my <code>System.Data.SQLite.dll</code> lib and my application to 32bit instead of 64bit (which I initially changed to because I downloaded the 64bit version of the sqlite lib.</p> <p><code>private string fullPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testdb.db");</code></p> <p>The problem is that on launch, there is an error saying that the <code>access to "C:/Program Files (x86)/Microsoft Visual Studio 11.0/IDE/test.db" is denied</code>, which means that somehow <code>AppDomain.CurrentDomain.BaseDirectory</code> references to that directory instead of my application's root directory.</p> <p>What could be the cause of this?</p> <p><strong>Update</strong>: Apparently, changing the applications platform target to x64, and using the 64b version of SQLite fixes the problem...</p>