Possibly save 1 hour of your time: There is a good way to manage your database objects. You can create a solution project for your database as follows.
In Visual Studio, go to File >> New >> Project. You should see the template under Installed >> Templates >> Other Languages >> SQL Server >> SQL Server Database Project.
If you cannot see the above template in Visual Studio 2015, then you need to get SSDT as follows.
Open Visual Studio (mine is 2015) >> choose Tools >> Extensions. Update Updates >> Product updates >> you may find the Microsoft SQL Server Data Tools (SSDT) update that contains the database project template. Select it and Update.
You can see it is installing Microsoft SQL Server Data Tools v14.0.61707.300.
Alternatively, you can also download the tools from