psake vs. rake for .NET builds
Asked Answered
U

3

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.

Upperclassman answered 5/10, 2010 at 19:34 Comment(0)
O
18

If you haven't done so, take a look at my Albacore project. it's a suite of rake tasks for building .NET solutions and will make working with Rake much easier for .NET solutions. You can get all the info you need from http://albacorebuild.net

having said that - i obviously have my own bias and preferences for which tool i would rather use. so take this with a grain of salt and understanding my preferences...

..................

I honestly think it's less a question of which tool does what you want, and more a question of which tool fits your skill set and comfort level. both psake and rake+albacore have pretty much the same functionality. they both work very well. they both make your job very easy compared to other tools. but they have different approaches and mind sets, based on their background and where they come from.

are you more comfortable with a stack of tools that is all Microsoft platform? or are you comfortable with tools that are outside of the typical MS stack, but still provide value to people who are building software on the MS stack.

would you rather have support for your build tool right out of the box, with powershell? would you rather have a c#-like experience, with the ability to incorporate C# and other .NET code into your build process? do you want the ability to use the various plugins for powershell that help automate various aspects of windows, for deployments?

or would you rather have a cross-platform, very open system that gives you a more natural language experience with the code you write, in ruby / rake? are you comfortable with *nix style tools and commands, ssh, and remote process execution for your deployments?

you say you don't mind installing ruby on the build server, which answers part of this question and leaves you open to the options. there's a lot of questions still needing to be answered, though.

if you are more comfortable with the MS stack and want the out-of-the-box experience of an MS based tool, then go with powershell. if you want to expand your horizons and get out of the MS stack a little, with a tool set that is easy to integrate and work with, to get a taste of what the Ruby world is all about, then go with ruby/rake/albacore.

i hope that helps, even though I have not given you a direct answer on which one you should use. hopefully i've given you enough to think about to determine which one is better for you / your team, though.

Ogrady answered 5/10, 2010 at 20:19 Comment(3)
Thanks to Derick and James, always nice to get answers straight from the horses' mouths! Although I had no problem with going outside the MS stack, I ended up going with psake. The portability and the breadth of available cmdlets won in the end, and although PowerShell can't touch Ruby in the cool dept, it's a pretty expressive little language in its own right and plenty adequate for my needs. Thanks again!Upperclassman
ya - the cmdlets are amazing little things. we use powershell for our automated deploys, and it's quite wonderful. the right tool for the job, right? :)Ogrady
link is broken.Leisure
B
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.

Backbone answered 7/10, 2010 at 4:55 Comment(2)
we use PowerShell for our deployments now. in the eval between ruby/rake/capistrano/chef and powershell with all of it's cmdlets, powershell made the most sense for all the reasons you listed. it's really nice for that kind of stuff on a windows box. but we still use ruby/rake/albacore for builds :)Ogrady
I'm a big fan of Powerhsell and so Psake has been the natural choice for my projects. An imperative build system is a breath of fresh air compared with the more traditional declarative build systems.Myrtie
O
18

If you haven't done so, take a look at my Albacore project. it's a suite of rake tasks for building .NET solutions and will make working with Rake much easier for .NET solutions. You can get all the info you need from http://albacorebuild.net

having said that - i obviously have my own bias and preferences for which tool i would rather use. so take this with a grain of salt and understanding my preferences...

..................

I honestly think it's less a question of which tool does what you want, and more a question of which tool fits your skill set and comfort level. both psake and rake+albacore have pretty much the same functionality. they both work very well. they both make your job very easy compared to other tools. but they have different approaches and mind sets, based on their background and where they come from.

are you more comfortable with a stack of tools that is all Microsoft platform? or are you comfortable with tools that are outside of the typical MS stack, but still provide value to people who are building software on the MS stack.

would you rather have support for your build tool right out of the box, with powershell? would you rather have a c#-like experience, with the ability to incorporate C# and other .NET code into your build process? do you want the ability to use the various plugins for powershell that help automate various aspects of windows, for deployments?

or would you rather have a cross-platform, very open system that gives you a more natural language experience with the code you write, in ruby / rake? are you comfortable with *nix style tools and commands, ssh, and remote process execution for your deployments?

you say you don't mind installing ruby on the build server, which answers part of this question and leaves you open to the options. there's a lot of questions still needing to be answered, though.

if you are more comfortable with the MS stack and want the out-of-the-box experience of an MS based tool, then go with powershell. if you want to expand your horizons and get out of the MS stack a little, with a tool set that is easy to integrate and work with, to get a taste of what the Ruby world is all about, then go with ruby/rake/albacore.

i hope that helps, even though I have not given you a direct answer on which one you should use. hopefully i've given you enough to think about to determine which one is better for you / your team, though.

Ogrady answered 5/10, 2010 at 20:19 Comment(3)
Thanks to Derick and James, always nice to get answers straight from the horses' mouths! Although I had no problem with going outside the MS stack, I ended up going with psake. The portability and the breadth of available cmdlets won in the end, and although PowerShell can't touch Ruby in the cool dept, it's a pretty expressive little language in its own right and plenty adequate for my needs. Thanks again!Upperclassman
ya - the cmdlets are amazing little things. we use powershell for our automated deploys, and it's quite wonderful. the right tool for the job, right? :)Ogrady
link is broken.Leisure
H
0

I'm currently developing PowerShell based build tools that combine XML configuration with the ability to use and extend the system with PowerShell itself. I want to have a simple build tools which can be extended and customized to fit in most build processes. Here is the project sample page:

Crawler-Lib Build-Tools Samples

Holmium answered 12/8, 2014 at 11:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.