I'm attempting to then add saved procedure to some build process in visual studio (using MSBuild).
I've got a database project (*.dbp) put into my solution, however unlike a few of the other database projects obtainable in Versus i am unable to build or run it. ( In my opinion this is actually the project file i would like like me using SQL2000)
How do i obtain the SQL scripts to operate when i build the project? I'm able to run the scripts by right clicking and pressing run.
Database projects aren't built like normal projects. If you wish to execute scripts inside this project, my advice is always to extend the connected project(s) that are MSBuild compatible (csproj, vbproj, etc.) and reference/execute your scripts after that making use of your tool of preference.
FWIW, we must support SQL Server 2000, 2005, 2008+, therefore the task becomes harder think NVarchar(max) (2005+) versus NText (2000+) plus all of the sp renames, etc between versions. We wanted just one script which designers, QA and installer accustomed to ensure consistency. So our approach would be a custom tool which permitted token/keyword substitutes inside scripts, which supplies versatility between different SQL Server versions and clients installations (e.g. user/login particulars, db names), in addition to integration into various technologies so scripts can run from command line, MSBuild, MSI custom action using Wix projects, or whatever we want these to run from.
Database projects could be Built.
They can't be run - they may be Used.
Whenever you deploy, the project develops after which deploys. The code is going to be used together with the Pre-Build and Publish-Build scripts and also the Pre-Deployment and Publish-Deployment scripts.
If you want scripts to operate while you BUILD the project, you need to consider the Pre-Build and Publish-Build under Build Occasions within the Project qualities.