In past few months I and my team have written several blog posts on VS 2010 Web Deployment features… In VS 2010 there was a lot of investment made in Web Deployment and over next few months we will be writing more on the subject…
Below is the list of all the posts for easy reference:
Overview of VS 2010 Web Deployment
- Overview of Web Deployment with VS 2010 and IIS
- Web Deployment Painkillers: VS 2010 & Web Deploy
- Web Deployment Demos, Slides & Videos for reuse
- Hanselminutes on 9 Video on Web Deployment
- Web Deployment Made Awesome: Hanselman’s MIX 2010 talk
- Web Deployment Overview on ScottGu's Blog
- Team Build walkthrough on using Web Deploy
- MSDN Documentation root for Web Deployment
Web Packaging (Put your web into a .zip file)
- 10 + 20 Reasons why should you create Web Packages
- Web Packaging: Creating a Web Package using VS 2010
- Web Packaging: Creating web packages using MSBuild
- Creating a Web Package using IIS Manager
- How does Web Deployment with VS 10 & Web Deploy Work?
- Installing Web Packages using Command Line
- Importing Web Package into IIS manager
- Web Packaging & Installation using Team Build
- Deploying to Devbox or 3rd party host IIS
Web.Config Transformation (Change Web.Config files per deployment environment)
- Web.Config Transformation
- Basic Web.Config Transformation for Publishing
- VS 2010 Snippets for Web.Config Transformations
- Web.Config Transforms (XDTs) for any XML files in your web projects
- Applying XDT Magic to App.Config Files
- Web Deploy Parameterization vs Web.Config Transformation
- Web Deploy Parameterization in Action
- Use Web.Config Transformation independent of Package/Publish
- Extending Web.Config Transformation by Sayed Hashimi
- Config Transformation outside of Web Applications
Database Deployment
- DB Deployment with Visual Studio 2010
- Replacing your old DB with new one using VS 2010
- SQL Script Options for DB Deployment in VS 2010
- Exclude App_Data during your deployment
- Deploy SQL Server Express (MDF) DBs to full SQL Server
- Delete existing DB Objects on Server before deployment
- Using SQL Management Objects (SMO) Options for DB Deployments
- Extending Web Publishing Pipeline (WPP) to package SQL files generated by TS Data Projects
- How to use VS Database Projects (TS Data/Data Dude) with VS 2010 Web Deployment
- Publishing Databases Incrementally
Web Publishing (Push you web from one machine to another)
- Web One Click Publish
- Server side setup of Web Deployment Tool (MsDeploy)
- How to ensure place holder folders are created during web deployment
- Free Web Hosting Announcement for VS 2010 Beta1
- Free Web Hosting Announcement for VS 2010 RC with DiscountASP
- Free Web Hosting Announcement for VS 2010 RC with OrcsWeb
- Deploying a Web Application using VS 2010
- One-Click Publish - What's New Since Beta 2
- List of common Web Deploy errors to hosting provider
- Publishing using Web Deploy on ScottGu’s blog
- Setting folder permission on Web Publishing
- Get VS 2010 Web Publishing updates from June 2012
Tips & Tricks for Web Deployment
- Converting Web Site Projects to Web Application Projects
- How to package or publish GAC Assemblies
- How to package or publish Registry Entries
- How to package or publish COM Components
- VS 2010 Beta2 Read Me Items for Web Deployment
- Web Deployment Projects (WDP) Beta for VS 2010
- Excluding Files and Folders from Deployment
- Migrating IIS6 to IIS7 using Web Deploy & Link Extensions
- Deploying to a Web Farm using Microsoft Web Farm Framework
- Excluding files/folder based on Configuration
- Including extra files/folder while deploying
- Installing Web Applications made easy via Web PI
- Web Deploy (MsDeploy) Creating a custom Provider
- Web Deploy (MSdeploy) Syncing 2 or more Folders
- How to see the Web Deploy commandline generated by VS 2010
- Setting Folder Permissions on Web Publish
- Compress CSS & JavaScript during Publish
- Video on deployment with VS 2010 and Web Deploy
- How to execute core MsBuild targets after Core Compile
Walkthroughs
- Deployment to a Hosting Provider
- Hosting an ASP.NET Web Forms Application on Windows Azure
- Hosting an ASP.NET MVC Application on Windows Azure
- Hosting an ASP.NET Web Application on Windows Azure
- Using a Web Deploy package to deploy to IIS on the dev box and to a third party host
Hope you will enjoy the VS 2010 Web Deployment features…
Thanks,
-Vishal
38 comments:
Very usefull information.
Thank you.
hello
This is great, thanks!
how does XBAP fit into all this?
XBAP are content files in the web project so they will be deployed just like that. the only trouble it might have is its config files are not transformable as web.config
woo,Thank you share
Hi, I'm desperatly trying to make work what is described in the msdn doc regarding the naming of connectionString in the SQL publish tab (http://msdn.microsoft.com/en-us/library/dd576376.aspx)
"If you specify a database name that ends with "-Web.config" and you specify a transform for the same connection string, the transform is not used. The value that you enter in this field is used in the destination Web.config file."
So basically it says that when the name ends by "-Web.config" the content of the textbox destination connectionString should replace the value in the web.config (tranformation is by passed)
But id does not work... Any idea ?
Cheers
Avi
Uhmmm……great share
Thanks a lot for the sharing the links with us.
good work
Nice efforts.
great job
Pretty nice post!!
Greetings I recently finished reading through your blog and I'm very impressed. I do have a couple questions for you personally however. Do you think you're thinking about doing a follow-up posting about this? Will you be going to keep bringing up-to-date as well? turbo fire Thanks
Fascinating... My cousin was searching this kind of info. He will be very happy when I give him your url. Thanks!
Ana
Fantastic! Thanks for your great blog.
No matter if you wrote this 2 years ago, THANKS a lot Vishal !! One of the best and clean MS Deploy i have ever read !
Thanks Dude !
This is a really stupid question but what language does the script need to be in?
tr
Hi Sac, which script are you referring to? Msdeploy has options to either write powershell script or even standard commandline.
Thanks
Vishal
Visual Studio 2010 comes with .NET Framework 4 and supports developing applications targeting Windows 7.It supports IBM DB2 and Oracle databases, in addition to Microsoft SQL Server.It has integrated support for developing Microsoft Silverlight applications, including an interactive designer.Visual Studio 2010 offers several tools to make parallel programming simpler: in addition to the Parallel Extensions for the .NET Framework and the Parallel Patterns Library for native code, Visual Studio 2010 includes tools for debugging parallel applications. The new tools allow the visualization of parallel Tasks and their runtime stacks. Tools for profiling parallel applications can be used for visualization of thread wait-times and thread migrations across processor cores. Intel and Microsoft have jointly pledged support for a new Concurrency Runtime in Visual Studio 2010 and Intel has launched parallelism support in Parallel Studio as an add-on for Visual Studio.Paper Shredder
Hello. First is first, just say that this is a great blog that has helped me a lot in my job. Great job.
Having said that, I have a doubt that you may be able to help me with. I am currently working in a deployment project and we have a situation in which we have to build & deploy multiple projects to multiple servers. (Project1-->server1; project2-->server2 & server3,...). We have accomplished this by implementing multiple builds, one for each project, but I was wondering if there was a way to automatise all this builds & deployments in one file, so we could do this by just one action. Any help would be greatly appreciated. Thank you!!
Sergio,
There is a wacky workaround to do this but it is not pretty. Here is what you can do.
Create build configurations per server and then right clicking and editing each project file and putting the settings in there (e.g. DeployOnBuild = True, ServiceUrl=XYZ etc - check out the Team Build post in the above list it has the list of properties). Then if you do a solution build in your Build server then this should work out fine.
I really do apologize that it is not as easy as it should be but we are working on making that happen in the future.
Thx
vishal
Hi Vishal!
I have a solution that contains multiple web application. Thanks to you I have configured and successfully published each one of these app to my IIS7 web server by using the one click-publish feature.
I was wondering now if there is an automatic way to publish all of them at once. Like one publish action for the entire solution based in one publish profile. Do you know what would be the best approach to accomplish this task?
Thanks a lot!
Hi Barbara,
Glad to hear that you were able to setup one click publish for all of your projects. Unfortunately there is no solution level publish option within VS IDE now. We will be working on it for the future.
If you want to deploy via team build then you can configure deployment on each project within its project file (csproj or vbproj) and then have the solution build. That way as part of the solution build the respective projects will get deployed.
Hope this helps.
Vishal
Thanks for great info, keep sharing more and more...
Thank you admin...
very nice posts!
great set of links on msdeploy, however i have one question that realy bother me.
How msdeploy together with say database projects are inteneded to be used in advanced scenarious?
Say deployment of multi-tier web application ( several DBs, web services, several web app projects ) with versioning support , on demand and scheduled builds, automated unit and acceptance test runs etc.
Have you seen any established scenarious for cases like that , or if you need stuff alike , just forget about this new features like web transform etc and do it as before - integration server like cc.net/ teamcity etc with several target configuration etc.
Hi Vishal,
I have a solution which has 3 websites and 1 database project and 1 server project (SQL SERVER 2008). I am trying to deploy the build using TFS at solution level. I was able to perform the deploy on the IIS server using the following details:
· Projects To Build - When you have only one web application and class libraries then it is easier to just have the Project (CSProj or VBProj) to build as shown in my example above, but if you have bunch of projects which all need to built then you might have to go with Solution Build option (.SLN).
Deployment for Web Apps is feasible at both Solution as well as Project build level although when it comes to Solution Build then you might want to make sure that the properties you are passing at Solution level will apply to all the projects in the solution which might not always the outcome you desire. In that situation all these properties can be set within the .csproj or .vbproj files too. You can do that by unloading your project file and in the top section just add above properties as you like:
For e.g /p:DeployOnBuild=True can be added as True
I tried the same approach for the database project by changing the settings in the database project (Sample.Database.dbproj) but was not able to perform the deploy.
Can you please help me in details regarding how to perform the database automatic deployment using the TFS
Please let me know if you have any further queries on the above details.
Thanks & Regards,
Santosh Kumar Patro
@Santosh, I have put together a sample which may help you out. Just send me an email and I'll send it to you, my email is sayedha [AT]{Microsoft}-DOTcom-.
Hi Santosh,
DeployOnBuild property is honored only by MVC and Web Application Projects and not DB Projects. For DB Projects please follow the instructions at http://blogs.msdn.com/b/webdevtools/archive/2010/03/24/extending-the-web-publishing-pipeline-to-package-database-project-deployed-sql-file.aspx
or
http://blogs.msdn.com/b/webdevtools/archive/2010/08/09/an-example-of-packaging-web-application-containing-database-upgrade-sql-file.aspx
Hope this helps
-Vishal
Hi Vishal,
Thanks a lot for your reply. I am able to deploy the database using TFS at solution level. I am using the following in the MSBuildArguments in the Process tab for the nightly build:
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=WMSVC /p:Configuration=Dev /p:MSDeployServiceUrl="https://ServerName:8172/MsDeploy.axd" /p:UserName=UserName /p:Password=Password /p:AllowUntrustedCertificate=True /p:TargetConnectionString=ConnectionString Details /p:TargetDatabase=TargetDatbase /p:DeployToDatabase=True /p:DeployToScript=True
But with the above settings I am having two issues as mentioned below:
1. I want to restrict the deploy of database in case of schema change only. How can I do this can you please guide me regarding it?
2. Say for example for the First version V1.0 of the Application I was able to successfully deploy the database with all the master data required for the master tables. Now there is some data available in the tables. As the build that I have prepared is the nightly build so every night at certain time the build will be deployed to the database server. So in that case all the data that is created by the user will be deleted or persisted. Can you please let me know. If the data is going to be deleted then how can we restrict the deletion of user created data.
Please help me to resolve these above mentioned issues.
Thanks & Regards,
Santosh Kumar Patro
Hi Santosh, for what you are looking you need to be able to compare your v1 DB with your v2 DB and generate schema diff SQL Scripts. You can generate these using TS Data projects available in Visual Studio or alternatively using tools like RedGate.
You will then have to configure these projects to build before your web project and consume the output of these in your web project deployment from the build server.
Please find links to these posts in the DB Section above, in particularly reference the posts titled:
Extending Web Publishing Pipeline (WPP) to package SQL files generated by TS Data Projects
How to use VS Database Projects (TS Data/Data Dude) with VS 2010 Web Deployment
Hope this helps
-Vishal
I use these features in my web site and they really do make deployment almost a joy. Rather than having to psych myself up to do a release over a stiff drink, now I just click a button.
Can you please help me in details regarding how to perform the database automatic deployment using the TFS
Hi Briquette,
In the DB section of this there are posts which tell you how to configure DB deployments. Once you do those then they should work with TFS too.
Hope this helps!
Vishal
Post a Comment