SSDT publish script recreates procedures with no changes
<p>I have a database imported into a <code>.sqlproj</code>, and a <code>.publish.xml</code> publish profile which publishes changes to a remote DB. </p>

<p>My understanding is that when I right click -> Publish -> Generate Script, it should calculate the diff between the local definitions and the remote DB, and generate a script to bring the remote DB in line.</p>

<p>This all seems to work OK, however, the script it generates always contains <code>ALTER FUNCTION</code> and <code>ALTER PROCEDURE</code> statements for the same 40 or so functions and procedures (out of a total of around 1000 defined), <em>whether they have changed or not</em>. When I compare the <code>ALTER</code> statements with the Script Function as -> ALTER to script in SSMS, they are exactly the same.</p>

<p>So my question is: Why does VS think these are different, or why would it recreate them anyway if they are the same?</p>

<p>Notes:</p>

<ul>
<li>The functions are not special - some of them are as simple as defining a varchar, setting it to a value and returning it.</li>
<li>I've tried running the <code>ALTER</code> scripts into the database, but they continue to be generated.</li>
<li>I've checked the properties (right click -> properties) in SSMS but can't see anything obviously different about those it always recreates and those it does not.</li>
<li>My publish profile is the bog standard one.</li>
</ul>

<p>Thanks</p>