azuredatastudio: Schema Compare tool showing objects as changed but no differences displayed in the diff itself (potential line ending mismatch)
- Azure Data Studio Version:
Version: 1.37.0
Commit: d904740d93d7df76a0ba361f20e4351813b57645
Date: 2022-06-14T00:52:49.854Z
VS Code: 1.59.0
Electron: 13.6.6
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.13.4-051304-generic
- OS Version:
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
KERNEL=5.13.4-051304-generic
Steps to Reproduce:
- Right click on a Database Project
- Select “Schema Compare” from dropdown menu.
- In the open Schema Compare menu select a SQL Database as the source and Database Project as the Target
- Observe that views and stored procedures appear with ‘Change’ in the Action column but the ‘Compare Details’ window below shows no material difference.

Could this be a line ending issue where procedures with CRLF line endings in the database compared the LF characters in the sqlproj files?
Does this issue occur when all extensions are disabled?: No - requires Databse Project Extension for Schema Compare
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (7 by maintainers)
Thanks for chatting this morning, @sgarwood! That was very helpful. For everyone else following along, we think this bug is stemming from the newline characters (
LFvsCRLF) in string literals. If a stored procedure (or anything else) is defined involving a multi-line string, the newlines in that string are not ignored by theIgnore Whitespaceoption… which makes sense because DacFx (the library that powers all these schema operations, like Schema Compare and projects) doesn’t want to try to interpret when it’s okay to convert a character inside of a user-defined string. Tracking down the chain of custody for a string (and therefore its newline characters) across an entire environment/flow can be tricky, 'cause it seems everyone along the way - SQL, Git, SSDT, ADS, Ubuntu, and Windows - all have opinions on what the newline should be and whether to convert it.Given that, I think we have some options:
Ignore Whitespacethat already exists.Any other options I’ve missed? Any feedback on the ones I’ve listed?
Hi @Benjin. Thanks for your efforts on this. I’ve only just had chance to attempt to recreate this from scratch. Following a very similar methodology to what you described above I am also unable to recreate this.
The project I am currently working on was an existing database that I have imported into SSDT but yet to rerun the publish on the production database. Would this have any impact do you think?
Thinking about this, perhaps a more accurate workflow would be:
I’ve dropped you an email as well if you’d like to arrange a call/screen share- I am happy to facilitate.