title: Create User in dacpac deployed by SqlPackage.exe leads to login failed SqlException
body: <h2>Problem</h2>
  
  <p>I'm trying to automate SQL deployment including User and Roles. It works when I create the user in Sql Management Studio, but when I deploy dacpack I get SqlException: Login Failed for user 'MyUser'</p>
  
  <h2>Description</h2>
  
  <ol>
  <li><p>I have SQL Server 2016 installed on localhost with both Sql Server and Windows authentication enabled.</p></li>
  <li><p>I have Sql Database project in Visual Studio with these files:</p>
  
  <ul>
  <li><p>MyUser.sql [build action=build]</p>
  
  <pre><code>CREATE USER [MyUser] WITH Password='$(MyUserPassword)';
  </code></pre></li>
  <li><p>RolesMembership.sql [build action=build]</p>
  
  <pre><code>ALTER ROLE [db_datareader] ADD MEMBER [MyUser]
  GO
  ALTER ROLE [db_datawriter] ADD MEMBER [MyUser]
  </code></pre></li>
  </ul></li>
  <li><p>I build it and deploy the created dacpac using command line:</p>
  
  <pre><code>SqlPackage.exe /Action:Publish
                 /SourceFile:"MyDatabase.dacpac" 
                 /Profile:"MyDatabase.publish.xml"
                 /v:MyUserPassword=c2Aaaaaaaaaaaa`
  </code></pre></li>
  </ol>
  
  <p>it works when when I execute this script in sql management studio.  But when I deploy it using SqlPackage it leads to the </p>
  
  <blockquote>
    <p>SqlException: Login failed for user 'MyUser'</p>
  </blockquote>
  
  <p>EDIT: </p>
  
  <p>I've investigated the generated sql script and in includes <strong>REVOKE CONNECT</strong>:</p>
  
  <pre><code>CREATE USER [MyUser]
      WITH PASSWORD = N'c2Aaaaaaaaaaaa';
  
  
  GO
  REVOKE CONNECT TO [MyUser];
  EXECUTE sp_addrolemember @rolename = N'db_datareader', @membername = N'MyUser;
  EXECUTE sp_addrolemember @rolename = N'db_datawriter', @membername = N'MyUser';
  </code></pre>
  
  <p>How to prevent the REVOKE CONNECT line being generated</p>