English 中文(简体)
What is a good build automation and deployment process for use with asp.net?
原标题:

I’m looking for some recommendations to do project building and deployment automatically.

Our current development setup uses ASP.NET, SVN, CCNET and an MSBuild script for the dev server build. I was thinking of switching over to Cruise instead of CCNET though I’m not sure if that gives me anything extra that I don’t have already.

What I’d like to automate is the process from after an automated build is done to updating the live site with the new changes. Site updates can include base site updates as well as client updates which can be code and/or database changes so the process needs to be flexible enough so it can handle those scenarios.

One of my sources of inspiration for this came from this video as well as the endless hours spent doing updates each month.

最佳回答

For smaller or personal projects, I would recommend using something like the free (and excellent) TeamCity by JetBrains. Unit test automation, continuous integration, and rules for what happens after a build (including moving it around to different locations).

For larger teams, I ve actually found a bit of build automation in the form of custom MSBuild tasks and RoboCopy works best. This nice combination between manually promoting builds between environments and using MSBuild & RoboCopy to automate parts of this process creates clean breaks between environments (with very few oops I didn t mean to push that there mistakes). It also lets us have QA review builds before promoting.

Update 7/31/2014:

I ve used custom TFS build templates with success. They re a bit complicated, but you can do quite a few cool things with them.

For open source projects (like NuGet libraries) hosted on GitHub, I don t think you can beat AppVeyor. I ve got a few projects like Mailchimp.NET that have complete build and NuGet deploy automation.

问题回答

Sounds like the two major functions for deploying your code changes is: 1. Copying files and 2. Executing DB Script Changes. If you look at using MsBuild Community Tasks there are plenty of handy build tasks that can help you along the way. SqlExecute and RoboCopy sound like they would be all you would need to use. This would require you modifying your project files to extend their build behavior but once that is done you d be able to "script" out the manual portion of what is being done.

I have used Nant in the past with a lot of luck for similar tasks. You can kick it off using your automated build. (http://nant.sourceforge.net/)

If you want something more comprehensive you can check out wix (http://wix.sourceforge.net/)

Now are you really sure that everything an autmatic build kicks off you want to update the live site? Or do you mean that you kick off a build, using your cc tool, and then it generates a build to go live?

I would hate to have the live site update when somebody checked in a new version of a file.

Your database updates will probably be the most challenging aspect. However as long as what is checked in for the databvase update is a change script, it is not bad.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签