title: Using PublishProfile in MSBuild for Database Project
body: <p>I have a database project in Visual Studio 2012. I am trying to create an MSBuild project to publish the database on the build server. In my solution, I have a Publish Profile that I would like to use on the build server.</p>
  
  <p>I have the following target setup:</p>
  
  <pre><code>&lt;Target Name="BuildDatabases"&gt;       
          &lt;MSBuild Projects="$(DBProjectPath)" Targets="Build;Deploy" Properties="DeployOnBuild=true;SqlPublishProfilePath=BuildServer.publish"&gt;
          &lt;/MSBuild&gt;
      &lt;/Target&gt;
  </code></pre>
  
  <p>I've tried a combination of PublishProfile and SqlPublishProfilePath to no avail. I always receive:</p>
  
  <pre><code>Deploy Error: The connection string is not valid
  </code></pre>
  
  <p>I can use the Publish Profile inside VS with no connection issues.</p>