title: DACPAC won't deploy because 'can't connect to server'?
body: <p>I'm trying to deploy a DACPAC to LocalDB 2012 but it's just not having it:</p>
  
  <p>Stack trace is as follows:</p>
  
  <pre><code>==================================
  
  Could not deploy package. (Microsoft.SqlServer.Dac)
  
  ------------------------------
  Program Location:
  
     at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, Action`2 reportStatus, CancellationToken cancellationToken)
     at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken)
     at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable`1 cancellationToken)
     at Microsoft.SqlServer.Management.Dac.DacWizard.DeployModel.Install()
     at Microsoft.SqlServer.Management.Dac.DacWizard.DeployModel.RunAction()
     at Microsoft.SqlServer.Management.Dac.DacWizard.ExecuteDacPage.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e)
     at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
     at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
  
  ===================================
  
  Unable to connect to target server. (Microsoft.Data.Tools.Schema.Sql)
  
  ------------------------------
  Program Location:
  
     at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointServer.OnInit(ErrorManager errors, String targetDBName)
     at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment..ctor(SqlDeploymentConstructor constructor)
     at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentConstructor.ConstructServiceImplementation()
     at Microsoft.SqlServer.Dac.DacServices.CreatePackageToDatabaseDeployment(String connectionString, IPackageSource packageSource, String targetDatabaseName, DacDeployOptions options, ErrorManager errorManager)
     at Microsoft.SqlServer.Dac.DeployOperation.&lt;&gt;c__DisplayClass4.&lt;CreatePlanInitializationOperation&gt;b__0(Object operation, CancellationToken token)
     at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
  </code></pre>
  
  <p>Now since I'm attempting to deploy this through SSMS, I know I can connect to the server. I've checked the solution in Visual Studio and the target version is for SQL Server 2012 and the connection string appears to be correct.</p>
  
  <p>Interestingly, doing a deploy through Visual Studio works, but then I can't upgrade the database to a data tier application, I get this message:</p>
  
  <pre><code>===================================
  
  Database source is not a supported version of SQL Server (localdb)\MYINSTANCE: . (Microsoft.SqlServer.Dac)
  ------------------------------
  Program Location:
  
     at Microsoft.SqlServer.Dac.DacServices.GetDatabaseSchemaProvider(String connectionString)
     at Microsoft.SqlServer.Dac.DacServices.InternalRegister(String targetDatabaseName, String applicationName, Version applicationVersion, String applicationDescription, ModelStorageType modelStorageType)
     at Microsoft.SqlServer.Dac.DacServices.&lt;&gt;c__DisplayClass29.&lt;Register&gt;b__28(Object operation, CancellationToken token)
     at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, Action`2 reportStatus, CancellationToken cancellationToken)
     at Microsoft.SqlServer.Dac.DacServices.Register(String targetDatabaseName, DacSchemaModelStorageType modelStorageType, String applicationName, Version applicationVersion, String applicationDescription)
     at Microsoft.SqlServer.Management.Dac.DacWizard.RegisterModel.RunAction()
     at Microsoft.SqlServer.Management.Dac.DacWizard.ExecuteDacPage.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e)
     at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
     at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
  </code></pre>
  
  <p>What am I missing?</p>