title: I can't get a Sql Server localdb connection to work on a computer that does not have SqlServer Express installed
body: <p>I have a C# console application written using Visual Studio 2012.  In the application I am using a Sql Server localdb connection to a database to store information.  This is working fine on several computers, all of which have Visual Studio installed.</p>
  
  <p>I would like to deploy a program that only has to install the Sql Server Express LocalDB, and not the larger Sql Server Express.  However, my application is not running on the target computers.  I have installed Sql Server Express LocalDB 2014 on a target computer.  I can, using a command line, run commands using sqllocaldb to verify that it is installed and running.</p>
  
  <pre><code>C:\Users\someuser\Desktop\Debug&gt;sqllocaldb v
  Microsoft SQL Server 2014 (12.0.2000.8)`
  </code></pre>
  
  <p>When I run my application on that same target computer, however, I get the following error.</p>
  
  <blockquote>
    <p>C:\Users\someuser\Desktop\Debug>Testing_Console
    <br>11:21:07,912 [1] INFO TestingConsole.Program - Current Directory is C:\Users\someuser\Desktop\Debug
    <br>Extra Info: (null)
    <br><br>
    <br>Unhandled Exception: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.</p>
  </blockquote>
  
  <p>The following is the beginning of my app.config file, where I am defining the connection string.  I have tried putting in the direct file path to the LM file, but that didn't fix the issue.  That was to be expected, however, as the program works from any directory on the computers with Visual Studio installed.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
    &lt;/configSections&gt;
    &lt;connectionStrings&gt;
      &lt;add name="KomoLM_Console.Properties.Settings.LMConnectionString"
        providerName="System.Data.SqlClient"
        connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\LM.mdf;Integrated Security=True;MultipleActiveResultSets=True"
   /&gt;
    &lt;/connectionStrings&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
  </code></pre>
  
  <p>I don't know if the issue is related to only have SQL Server Express LocalDB 2014 installed.  Can anyone tell me what my problem might be?</p>