SSDT schema compare, removing and then renaming stored procedure result is incorrect The initial setup contains two scripts:


stored_procedure.sql
stored_procedureV2.sql


What I did is:


Remove stored_procedure.sql
Rename stored_procedureV2.sql to stored_procedure.sql


When I perform a schema compare in SSDT between a .dacpac not containing this change and my project the action it proposes is to just remove stored_procedure.sql and do nothing else, whilst it should remove stored_procedureV2.sql and update stored_procedure.sql to its new content.

As I assume this is where schema compare gets its information:

The .sqlproj of the source:

...
&lt;Build Include="Scripts\stored_procedure.sql"&gt;
  &lt;AnsiNulls&gt;On&lt;/AnsiNulls&gt;
  &lt;QuotedIdentifier&gt;On&lt;/QuotedIdentifier&gt;
&lt;/Build&gt;
&lt;Build Include="Scripts\stored_procedureV2.sql"&gt;
  &lt;AnsiNulls&gt;On&lt;/AnsiNulls&gt;
  &lt;QuotedIdentifier&gt;On&lt;/QuotedIdentifier&gt;
&lt;/Build&gt;
...


The .sqlproj of the target:

...
&lt;Build Include="Scripts\stored_procedure.sql"&gt;
  &lt;AnsiNulls&gt;On&lt;/AnsiNulls&gt;
  &lt;QuotedIdentifier&gt;On&lt;/QuotedIdentifier&gt;
&lt;/Build&gt;
...


Is this a known issue? Do I need to perform this in two steps? Is there a way to make SSDT behave the way I want?
The issue was that stored_procedure.sql still had stored_procedureV2 as procedure name. Then SSDT actually does a correct compare by saying: stored_procedureV2.sql is unchanged and stored_procedure.sql is removed.