Alex Rivera | Logout

psake vs. rake for .NET builds

Asked 2010-10-05T19:34:13.660
18

I'm investigating build tools for use with an ASP.NET MVC 2 application. I like the idea of using a scripting language rather than XML, and have narrowed my choices down to psake or rake. I don't have much experience with Ruby or PowerShell, but am willing to learn either. I don't mind installing Ruby on my build server if that's my best option.

Nothing too complicated or unusual about my build. It'll need to pull my source from a Mercurial repo, build a Visual Studio 10 solution, do some transformations of config files, build/run a SQL script based on a Database (Data Dude) Project, replicate VS's Web Publish, and probably do some other basic file syncing.

Anyone have experience with both rake and psake that could compare them? Does one have an edge over the other in terms of features, or does it just come down to scripting language preference?

Thanks in advance.

EDIT: I don't have a CI solution in place yet, but I'm leaning toward using TeamCity. Thought I'd mention it in case one build tool plays nicer with it than the other.

Edit
Report

1 Answer

24

I would have to agree with Derick's assessment. It really depends on whether you and your team feel more comfortable with Ruby or Powershell (and also which you see more value in learning). Both have their strengths and weaknesses. Either is better than XML IMHO. And as Derick said, I too have my own bias as I'm the original author of psake. :)

A few advantages of psake/PowerShell:

  1. PowerShell is already installed on Windows 7 and Server 2008. Easily installed on XP and 2003.
  2. Easily included with your solution in version control. (Fewer moving parts.)
  3. You can take a PowerShell command line and paste it vertabim into a psake task.
  4. Microsoft and 3rd-parties creating lots of cmdlets.
  5. Your IT guys/gals probably know some PowerShell, which might make them feel more comfortable when automating deployments. (The deployment script isn't such a black box.)

A few advantages of rake/Ruby:

  1. Rake has a larger community as it is used extensively through the Ruby community.
  2. Ruby is a more expressive language than PowerShell, though you probably want to keep things simple in your build scripts.
  3. Albacore makes building .NET projects with rake much easier.
  4. Rake has a nice namespacing mechanism to group together tasks.

Both solutions work to get your solution built. Choose the one that works for your team. Hope that helps.

answered 2010-10-07T04:55:55.700

Your Answer