So since middle of June I have been working on the .NET CLR team. I am responsible for deployment of the .NET Framework. And boy is there some work to do. First things first though just how do you deploy applications written in .NET. It turns out that is a very complex topic.
Deployment Technology
So just how complex is .NET deployment -- it is as complex as how simple it can. You can deploy applications via
- xcopy deploy
- Visual Studio Setup Projects or 3rd party installers
- Web Publish from Visual Studio
- Clickonce
- XBap
- System Management tools like SMS and AD
The above is not even a complete list. So where do you start if you are writing a .NET application? The first thing is to not make the mistake of thinking deployment is the last thing you do.
Mobile Deployment
In the mobile world when picking which version of the Compact Framework one of the considerations is how the Compact Framework is deployed. Is the Framework already on the phone or will it have to be put on the phone? Typical if the application is an Enterprise Application using the latest Framework benefits outweigh the issues of deploying both the application and framework. If the application is consumer oriented then basing on the minimum platform Windows Mobile 5 or Windows Mobile 6 is a better chose. You pick Compact Framework 1.0 or Compact Framework 2.0 based on target hardware. This allows for targeting the largest audience while minimizing deployment and size issues.
Server Deployment
The server world might seem the simplest so I will start there. With servers the type of applications are typically web or server applications. In this scenario the application is deployed to one or more servers. Typically the .NET Framework has been installed or pushed to the servers usually via a application management system like System Center Configuration Manager. ASP.NET or WCF is stopped, xcopied over and then restarted. The difference when using SCCM is that the process is automated to allow deploying the application to tens or hundreds of servers without human intervention.
Client Deployment
So far it seems that deployment is simple deploy the .NET Framework and then the application. It turns out that device and server developers have it easy compared to desktop developers. Updating an application seems even easier just copy over the application. If only.
It turns out that just like device developers - desktop developers need to make some choices upfront. Desktop developers need to ask themselves how will the application be deployed. If you are desktop developer you have a lot of choices. Do you deploy via
- Simple xcopy of the >NET application
- Application management tool that deploys the framework and then your .NET applications
- XBap allows for using the browser as the UI container. In this scenario the application is setup on a web server and hosted inside IE. Note you must push out the framework.
- Clickonce is a technology that creates a package that ensures the framework is deployed before deploying and running the application. In fact Clickonce will ensure that the framework and application is up-to-date before running the application.
-
Finally a installer can be created to install just the .NET application or also the framework.
The space is large and this blog only gives you a glimpse into the deployment space. Hopefully you will find it useful.
Comments