views:

1238

answers:

6

I know enough to know that we need to get our application to deploy with a single user action. However, I don't know:

  1. What are some good tools to use in a .NET shop?
  2. How do you manage config changes for each of your environments?

Can someone point me to some good resources for continous integration. I'd like to see some theory as well as a step by step practical guide.

Edit:
I'm in need to automated a web deployment right now; however, I'd also like to learn how to do this for desktop apps.

+1  A: 

Visual Build Pro from Kinook is a pretty good tool for one-click deployment. It's easy to use and has a lot of capabilities. I have been using it for years. Of course there's also NAnt, which I haven't used much.

As far as managing config changes, I manage multiple config files with extensions that indicate the deployment environment, and then just do a simple rename as a step within my build script.

For example, if I am deploying to Test, I might have a config file called Web.test.config, which gets automatically renamed to Web.config by the build script.

jeremcc
+2  A: 

We've had great success with Windows Installer XML. Basically, you define the components that make up your application in XML and WiX turns that into an MSI package. Documentation is relatively sparse, but the provided CHM file combined with search fu will get you a long way there.

The MSI packages can take input parameters for configuration values and perform actions to manipulate configuration files after the application has been deployed. For example, "msiexec /i MyCustomPackage.msi SqlServer=SomeSQLBox" could deploy the web application and modify the configuration entry for a dependent SQL box.

Gabriel Isenberg
MSI packages are good for windows apps, but for web apps, I feel that a more incremental update process is better. For example, VBP (as mentioned in my response) can detect that only a single ASPX page has changed and *just* deploy that, which saves potential downtime, session timeouts, etc.
jeremcc
A: 

I see two different questions:

  • For the deployment thing: The ClickOnce deployment should do it. You just publish your desktop application by going in VS.net at Build menu > Publish. VS.net then compiles a web page and a setup.exe. When users with IE or Firefox and .net 3.5 SP1 click on the link, it runs right away. ClickOnce also handles updating for you and there's extensive API to develop for it.
  • Continuous integration is a very different thing. I suggest that you google for 'CruiseControl.net' and download and try out as many resources as you can. It's basically a build server but you can connect it with SVN, NUnit for testing and so on. I wouldn't suggest buying a book for such a volatile product. It's best to download it and try things out.
KCorax
A: 

CruiseControl.NET for your ContinuousIntegration solution. For deployment I use an MSBuild project file. At the top of that I keep all of the servers config files. I pass to MSBuild on the through the parameters a server property which tells MSbuild which config values to use and then completes the deployment. The only deployment that cannot be done right from CruiseControl is the one to our live servers. We leave that command line MSBuild just so we don't accidentally push a button, or so someone with access to the CC.NET web dashboard does it just playing around.

Alex
+4  A: 

I wrote a blog post that may be helpful:

Visual Studio Web Deployment Projects

It is a year and a half old, but talked about some new (at that time) project templates for VS and also a command-line utility from the IIS team called MSDeploy. They sounded really promising and it appeared they are ideal for targeting multiple build configurations, syncing multiple servers across a farm, and more control all around about the actual output of your website deployment.

Perhaps by now the technologies have matured as well.

mkmurray
+1  A: 

Please check my blog for automatioc deployment in .NET

http://varunkumargoel.blogspot.com/2010/03/how-to-make-automatic-deployment-for.html

Thanks, Varun Kumar

Varun