title: Error that SQL Login already exists
body: <p>I have created 2 SQL Server Database Projects in VS 2013 and imported schemas from 2 databases that reside on the same SQL instance.  Both databases have SQL Users, let's say [MyUser1] and [MyUser2], that use a single SQL Login, let's say [MyLogin].  The issue is both projects want to create the SQL Login and this causes the error </p>
  
  <blockquote>
    <p>"SQL71508 The model already has an element that has the same name MyLogin"</p>
  </blockquote>
  
  <p><strong>DB1 Project</strong></p>
  
  <p><code>CREATE LOGIN [MyLogin] WITH PASSWORD = N'xyz';</code></p>
  
  <p><code>CREATE USER [MyUser1] FOR LOGIN [MyLogin];</code></p>
  
  <p><strong>DB2 Project</strong></p>
  
  <p><code>CREATE LOGIN [MyLogin] WITH PASSWORD = N'xyz';</code></p>
  
  <p><code>CREATE USER [MyUser2] FOR LOGIN [MyLogin];</code></p>
  
  <p>I've tried:</p>
  
  <ol>
  <li>Removing CREATE LOGIN from one of the projects.  Issue is then CREATE USER generates an error because it wants the CREATE LOGIN for the Login to exist.</li>
  <li>To find a way to ignore the error, but all I've found is how to ignore warnings. </li>
  <li><p>Using the following to check if Login already exists, however an error is generated at the "If" indicating, "SQL700001 The statement is not recognized in this context".</p>
  
  <p><code>If Not Exists (Select name From master.sys.server_principals Where name = 'MyLogin') 
  Begin
  CREATE LOGIN [MyLogin]
  WITH PASSWORD = N'xyz';
  End</code></p></li>
  </ol>
  
  <p>Does anyone have any thoughts on how to correct or work around this issue?  Thanks!</p>
  
  <p>Also, my primary reason for creating the DB2 project was due to views in DB1 that are based on tables in DB2.  Without the DB2 project referenced in the DB1 project, the SQL to create the views generated errors about not finding the tables in DB2. So, if anyone has any thoughts on how to workaround this issue, that would be helpful too.  </p>