SSDT Schema Compare add blank lines to the schema files
Asked Answered
P

3

31

I am using Schema Compare feature in Visual Studio 2017 to compare a database with database project (.sqlproj).

If I apply some changes to the project it also adds blank lines to some of the schema files.

After some investigation I found that I'm not the only one facing this issue. From the number of upvotes I can guess that MS will not fix this issue soon.

Has anyone found any workaround for this?

Pictorial answered 20/4, 2018 at 14:59 Comment(0)
C
1

Microsoft has finally (June 2024) acknowledged and fixed this bug, but it hasn't been released yet. See this link for details.

https://developercommunity.visualstudio.com/t/SQL-Server-Database-Project:-SQL-Schema/10633571?q=schema+blank+lines

Consubstantial answered 14/6, 2024 at 22:43 Comment(0)
H
0

Not really a workaround or a solution, but I remember having this issue on Visual Studio 2017 and the issue stopped arising when I upgraded to Visual Studio 2019.

Hass answered 25/11, 2022 at 15:8 Comment(3)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewPsychoneurosis
I agree Ross Presser, I don't have a solution and I can't comment on the original question (not enough reputation). The "solution" would be to upgrade to Visual Studio 2019, but the original question was related to Visual Studio 2017, which I guess was the latest available version at the time. Do you think I should delete my answer?Hass
VS2022 has options in the settings menu to configure whitespace handling - no idea if that was in VS2017 and don't have a copy available to check, but worth a look.Valera
E
-6

You may want to check your error list in Visual Studio. There is a good chance that there are dependent objects (e.g. Users, Logins, Tables, Keys) that the object is dependent on and is missing and not synchronized. If you synchronized those missing object to your database project first it may resolve your issue.

Event answered 29/1, 2019 at 20:11 Comment(1)
Not related to the question, which is about additional blank lines in schema files.Brinn

© 2022 - 2025 — McMap. All rights reserved.