开发者

psake vs. rake for .NET builds

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 l开发者_C百科earn 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.


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜