Pre-build Event / Post-build Event Command Line Dialog Box (Database Projects)
In the Build Events pane, you can create pre-build events or post-build events by typing directly in the Pre-build event command line or Pre-build event command line boxes. You can also click Edit Pre-build or Edit Post-build and then specify one or more pre-build and post-build macros from a list of available macros.
Pre-build events do not run if the project is up to date and no build is triggered. You control post-build events by clicking an option in the Run the post-build event list on the Build Events pane.
You can use any of the macros in the following table to specify file locations or to get the actual names of the input files in the case of multiple selections. These macros are not case-sensitive.
The name of the current project configuration (for example, "Default").
The base name of the project.
The file extension of the project. It includes the '.' before the file extension.
The name of the currently targeted platform (for example, "AnyCPU").
The path name of the primary output file for the build (defined with drive, path, base name, and file extension).
The output type of the project. For database projects, this type is "database".
The version of SQL Server that the database project is targeting. This result will be either SQL Server 2008 or SQL Server 2005.
The name of the target database.
The connection string that is used to connect to the server on which the target database resides (or will reside).
The path of the MSBuild binaries (for example, C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727).
The default schema for unqualified objects.
The directory of the solution (defined with drive and path). This result includes the trailing backslash '\'.
The absolute path name of the solution (defined with drive, path, base name, and file extension).
The base name of the solution.
The file name of the solution (defined with base name and file extension).
The file extension of the solution. This result includes the '.' before the file extension.
The installation directory of Visual Studio 2005 (defined with drive and path). This result includes the trailing backslash '\'.