MSBuild /target:SQLBuild MyProjectName.dbproj
Performs an assembly-only action. It creates only one database project named MyProjectName.dbproj. The project properties in the .dbproj file are used to build the build script.
MSBuild /target:Deploy /property:TargetDatabase=UpdatedTargetDatabase;TargetConnectionString="Data Source=(local)\SQLEXPRESS;Integrated Security=True;Pooling=False" MyProjectName.dbproj
Deploys the database project, overriding the name of the target database and the connection string.
source share