Reputation: 67
I have a .NET project. When I do a SQL Server Schema Compare between what is on a local SQL Server 2017 database to Visual Studio in the direction of Database --> Project
, the compare lists all tables, views, procedures and functions that are in the database under "Add".
It is unable to see the database objects in the project, so it thinks it needs to add everything to the project. Nothing shows in the Target object definition panel for any of the listed objects
If I do go ahead with the update to add a table to the project, E.G. Exhibit table, then it appears as Exhibit_1.sql
in the project alongside the existing Exhibit.sql
.
However, some changes were made to procedures in the database that showed up under "Change" so I was able to update them as normal
If I reverse the direction of the compare to Project --> Database
, it lists all of the objects under Delete
SQL_Latin_General_CP1_CI_AS
on bothIs there anything else I need to do for the SQL Server Schema Compare to show the correct comparison? Something in the comparison settings?
Upvotes: 1
Views: 413
Reputation: 1
Check the object's properties in the solution explorer. Verify that the "Build Action" property is set to "Build" and not "None" before performing the schema compare.
Upvotes: 0