X

Visual Studio 2010: Web application packaging and publishing

Visual Studio 2010 has very powerful web application packaging and deployment system. When deploying your web application you create the deployment package and then publish it to web server. After configuring it is one-click action to get current version of application up to target server. Let’s see how it works.

Packaging and publishing settings

As a first thing you may take a look at project properties. There is new tab called Package/Publish where you can find all packaging and publishing defaults. You don’t have to change these settings unless you really-really need it. For me default settings are working very well.

You can click on the image on right if you want to see those settings. It is also possible to deploy your database to target server but I will blog about this some other time. Let’s focus on application deployment in this posting.

Creating package

To create package you just have to right click on your project and select Package –> Create Package. Check out the following fragment of screenshot.

You can find package under obj folder of application. Screenshot (or windowshot?) on right shows you obj and Package folders and Package folder contents. Just click on it to see it at original size.

Package folder has same structure that is published to target server. You can see here all files and folders of your application that are to be published. These files and folders are under PackageTmp folder.

Package folder contains files that are used to deploy you web application. You can see there also zip-file. This is the package that is sent to target server to save you some bandwidth. Of course, it depends on packaging settings if zip file is used for deployment or not. I suggest you to use zip-file because in this case only one file will be uploaded and probability of network problems during upload is smaller.

Publishing

To publish your project right click on the project and select Publish. Because you may have more than one target environment where you may want your application to be deployed then publishing profile will be asked. In this window you can also manage publishing profiles.

Here you can set all options needed for application publishing. As test servers may use homemade certificates then it is also possible to accept them. The other settings here should be pretty obvious. To publish your web application immediately you can use Publish toolbar as show on the following image. Just click on the highlighted icon and publishing starts without any additional dialogs.

One-click publishing is one of the most powerful deployment features of Visual Studio 2010. Other testers have told and written that this is most stable and bullet-proof web application deployment system they have seen under Visual Studio.

Try it!

If you feel like trying out Visual Studio 2010 and new web features then feel free to read my blog entries Visual Studio 2010 and .Net Framework 4.0 downloads and Visual Studio 2010 and .Net Framework 4.0 to get started. To get free beta hosting for your ASP.NET 4.0 web application check out my blog entry Free ASP.NET 4.0 beta hosting available.

I am experimenting right now on ORCS Web beta hosting where I publish my ASP.NET 4.0 MVC application – picture gallery for my photos of my bunny. To get ASP.NET MVC applications running on ORCS Web beta hosting you must make ASP.NET MVC 1.1 reference as local reference in your web application project.

And last suggestion – try it out by yourself. :)

Liked this post? Empower your friends by sharing it!

View Comments (1)

Related Post