views:

85

answers:

4

I've created an asp.net website with VS2008, how can I publish it in VS2008? P.S:
I've used Right Click -> publish but, I've used a Database in my project, but VS2008 doesn't publish it.

P.S: I'm using SQL Express 2008

Solution Explorer

A: 

right click > publish

Louis Rhys
I knew, but it doesn't work, as you can see I've used a DataBase, VS2008 doesn't publish it !!! BTW, I'm using SQLExpress
Mohammad
-1 for not reading the question properly.....
slugster
@slugster: to be fair the explanation was in the edits after i posted this answer
Louis Rhys
@slugster: Louis Rhys has the right. I added them after editing.
Mohammad
A: 

That's a big advantage of using Visual Studio 2010,

http://weblogs.asp.net/scottgu/archive/2010/07/29/vs-2010-web-deployment.aspx

Therefore, if you like, you can use Visual Web Developer 2010 Express if you cannot afford upper editions.

Lex Li
A: 

I would assume that this 'limitation' is by design.

1) Typically, one does not want wo wipe out all the data that users have entered in an enviornment when a code change is made.

2) Xcopy of Database files does not work, as the file is locked by applications using it.

Is it you intention to publish the data as well?

If you want to publish just the Database changes (Updated tables/sprocs NOT data). SQL scripts would need to be generated/run against the target Database.

EDIT - Add what you can do:

You cannot use the VS.NET Publish feature.

If you want to push the data. Stop IIS (or the cloest logical IIS object -Application /app pool ). Copy the mdf from target to destination server.

If you NOT want to push the data (Just Schema). During the dev cycle generate any scripts for: data additions (ie lookup data) table/Sproc/indexes ect updates. Be careful to have the scripts are in the right order.

Pre- deployment. Get a copy of your target enviornment's dastabase. Test the SQL scripts

For deployment: Stop IIS (or the cloest logical IIS object -Application /app pool ). Promote code changes as you would using "Publish" feature.
Backup your target enviornments database. Connect to the target enviornment's database and update schema using the scripts. Restart IIS

The deployment of this can all be automated if your willing to spent time developing the required sctipts and building a process around it.

As mentioned by others, VS.NET 2010's webdeploy (msdeploy) attempts to make this alot easier. I have not used these features myself.

Good luck

brian chandley
+2  A: 

Try the webdeployment project for VS2008 that should give you what you want: http://www.microsoft.com/downloads/details.aspx?familyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en

hope that helps

JamesStuddart