the demise of xcopy deployment
DESCRIPTION
One of the great features of .Net when it first released was Xcopy deployment. No more .dll registrations, just copy the files to the web server. While this was a great feature for Microsoft developers, new problems emerged, specifically around managing web.config. Sections like connection strings and custom errors need to be managed between environments, which meant many copies of the files or scripts to change them. Other necessary steps, like managing permissions and IIS configuration were still outside the Xcopy process. A recent tool, MSDeploy, is now integrated into Visual Studio 2010 and makes managing these issues easier. Besides web.config, MSDeploy also manages file deployments and synchronization, ACLs, and IIS settings. If your deployments have multiple steps, need ReadMe files, or can’t be done by someone outside your team, you need to learn MSDeploy!TRANSCRIPT
![Page 1: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/1.jpg)
The Demise of Xcopy Deployment
David Truxall, Ph.D.
![Page 2: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/2.jpg)
MSDeploy
One-Click Publish
![Page 3: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/3.jpg)
Who Am I?
www.davidtruxall.com/
Developer – Troubleshooter – Trainer - Consultant
@davetrux
![Page 4: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/4.jpg)
Agenda
• About MSDeploy• IIS Console• Visual Studio 2010• Command-Line
![Page 5: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/5.jpg)
MSDeploy
One-Click Publish
![Page 6: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/6.jpg)
Why MSDeploy?
IIS 6 IIS 7
![Page 7: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/7.jpg)
Where do I get it?
• Web Platform Installer• Separate download• Visual Studio 2010
![Page 8: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/8.jpg)
Architecture
• Provider Based
• Package• Deploy• Synchronize
![Page 9: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/9.jpg)
Verbs• dump• sync• delete• getDependencies• getParameters• getSystemInfo
![Page 10: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/10.jpg)
MSDeploy Process
IIS
PackageFile
MSDeploy Create thePackage
MSDeploy
IIS
VS 2010
Command-line
PowerShell
![Page 11: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/11.jpg)
Deployment• Using IIS Manager UI • Using command file created by Visual Studio 10 • Using command line using MSDeploy.exe • Using Power Shell support provided by MS Deploy • Using managed APIs provided by MS Deploy
![Page 12: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/12.jpg)
Create the Package
![Page 13: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/13.jpg)
Deploy the Package
![Page 14: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/14.jpg)
Providers
CertificatesCOM objects
File System GAC
Machine Config
App PoolsACLs
IIS
SQL Server
MySQL
Registry
Custom
![Page 15: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/15.jpg)
Integrates with IIS Console
• UI• Import/Export– Synchronization– Migration
Remember Today’s Password: Elastic Syntax
![Page 16: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/16.jpg)
Agent Service
![Page 17: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/17.jpg)
IIS Demo
![Page 18: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/18.jpg)
Visual Studio 2010
![Page 19: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/19.jpg)
Managing Web.config
• Transformation– Connection strings– Custom errors
• At Publish, not at Build
![Page 20: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/20.jpg)
Publishing
• Offline• Online
![Page 21: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/21.jpg)
Package
• Manifest• Contents
![Page 22: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/22.jpg)
VS 2010 Demo
![Page 23: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/23.jpg)
Command-Line
msdeploy.exe -verb:<verbName> -source:<provider>[=<pathToProviderObject> [,<providerSetting>=<providerSettingValue>]] [-dest:<provider>[=<pathToProviderObject> [,<providerSetting>=<providerSettingValue>]] ] [-<MSDeployOperationSetting> ...]
![Page 24: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/24.jpg)
Command-Line Demo
![Page 25: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/25.jpg)
Continuous Integration
<Exec Command='"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe"
-verb:sync -source:contentpath="$(DropLocation)\$(BuildNumber)\Release\Site" -dest:contentpath=\\TESTSERVER\Site' ContinueOnError="false" />
![Page 26: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/26.jpg)
Building A Dev Server
• Configure IIS Management Service• Open firewall port (8172)• Install MSDeploy
![Page 27: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/27.jpg)
PowerShell in Action
![Page 28: The Demise of Xcopy Deployment](https://reader036.vdocuments.site/reader036/viewer/2022081519/5552666db4c905d41d8b503b/html5/thumbnails/28.jpg)
Thanks!
www.davidtruxall.com
@davetrux
www.linkedin.com/in/davetrux
Slideshare.net/davetrux