Supporting ASP.NET Application Services in Visual Studio Database Professional Edition

In the current project that I am working on we are using Visual Studio 2008. This means that we can make use of LINQ to SQL to access our fairly extensive database schema, and we can manage the development and deployment of that schema using the Database Professional features of Visual Studio Team Suite.

However, I wanted to leverage the significant work already done as part of ASP.NET around user and role management and this meant I needed to find a way to neatly integrate those database creation scripts into the one I built with DB Pro.

I’d be nice if I could “Add Reference” to the ASP.NET database schema so that my database deployment would include it, but its not possible (yet). Instead what I decided to do was use the export feature of the “aspnet_regsql.exe” tool.

aspnet_regsql.exe -S (local) -E -sqlexportonly import.sql -A all -d MyDatabase

This generates a file called import.sql which I then opened and copied to contents of into my Script.PostDeployment.sql file inside the database project. I also trimmed off the database creation and USE logic up the top of the script to make the schema a bit more portable.

Can anyone think of a neater way?

3 thoughts on “Supporting ASP.NET Application Services in Visual Studio Database Professional Edition

  1. Pingback: Team System News : VSTS Links - 10/15/2007

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s