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
- Local Database is SQL Server 2017 but was upgraded from 2008.
- Compatibility level is set to 2017 in the database properties in SQL Server Management Studio
- In Visual Studio I have set the Target Platform of the database to SQL Server 2017.
- I have ticked "Validate casing on identifiers" and Database collation is
SQL_Latin_General_CP1_CI_AS
on both - Visual Studio is version v15.7.1 and .NET is 4.7.03056
Is there anything else I need to do for the SQL Server Schema Compare to show the correct comparison? Something in the comparison settings?