It's been a while sinse I used database projects and I'm tearing my hair out trying to figure out where to set the database name for this project.
I've tried in the SQLCMD variables section, but it doesn't let me (error below). I guess this section is to define your own variables (the same happens if I try $(DatabaseName))
The help link also doesn't work which is really helpful (goes to this dead link)
You can override DatabaseName using one of the following methods:
TargetDatabaseName
argument. Example: sqlpackage.exe /Action:Publish /SourceFile:C:\DbProject\bin\Debug\DbProject.dacpac /TargetServerName:localhost /TargetDatabaseName:TestDb
(See here for all sqlpackage.exe arguments)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With