This blog explains how to compare schema between SQL server project and target database as well as publishing the changes to target database.
You can refer here to create a SQL server project.
Comparing Schema:
Right click on the project and select 'Schema Compare'
On SQLSchemacompare window select target option and select your database.Here localdb server has been choosen.
Click on 'Compare' to compare the project with target database,
You can save the compare file as below for future comparisions
This is how you can compare SQL server project to target database and can save the compare file.