Should I switch from nant to msbuild?

后端 未结 18 1634
粉色の甜心
粉色の甜心 2020-12-13 19:22

I currently use nant, ccnet (cruise control), svn, mbunit. I use msbuild to do my sln build just because it was simpler to shell out.

Are there any merits to switch

相关标签:
18条回答
  • 2020-12-13 19:37

    We also switched from nant to msbuild. If Your build is pretty standard, then You won't have much problems setting it up, but if You have a lot of specific build tasks, You will have to write custom ms build tasks, as there are way less custom tasks for msbuild.

    If you want to display reasonable build results, You will have to mess with custom loggers etc. The whole team build is not as ripe as nant is.

    But the real benefit is integration with TFS source control and reporting services. If You are not using TFS as Your source control system, it's not worth it.

    0 讨论(0)
  • 2020-12-13 19:37

    The only reason I can see for using msbuild is if you would like to use a automated build server like cruise control. If you are not going to switch, then I would leave it alone.

    0 讨论(0)
  • 2020-12-13 19:42

    @Brad Leach

    I generally wouldn't switch between them unless there was a compelling feature that was missing

    what are the compelling reasons to use msbuild? are there cons?

    So far I'm getting a pretty good, "no don't bother" from your answer.

    0 讨论(0)
  • 2020-12-13 19:42

    I use Nant and I love it. I used MSBuild and hated it because of these:

    1. Microsoft forces you to follow their own build procedure that is so intrinsic to their doings that I at least was not able to make it work (I had to compile NET1.1 so I had to mix Nant and MSbuild). I know you can create your own MSBuild file, but I thought it was complex to understand and maintain.

    2. ItemTypes to do file operations are just too hard to follow. You can have Nant do the exact same things and much easier and direct (I had to create an ItemType list and then pass to the file operations).

    3. In MsBuild you have to create your own task dll, in Nant you can do this or you can embed C# code within your script, so its much easier to advance and just build the whole project.

    4. Nant works with Net1.1, MsBuild doesn't.

    5. To install nant, I can even unzip and locate inside my own repository to run it. To install MsBuild is much harder since it depends on many things from Visual Studio, etc. (maybe I'm wrong here, but that seems to be the truth).

    Well these are my opinions...

    0 讨论(0)
  • 2020-12-13 19:44

    Nant has more features out of the box, but MSBuild has a much better fundamental structure (item metadata rocks) which makes it much easier to build reusable MSBuild scripts.

    MSBuild takes a while to understand, but once you do it's very nice.

    Learning materials:

    • Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build
      by Sayed Ibrahim Hashimi (Jan, 2009)
    • Deploying .NET Applications: Learning MSBuild and ClickOnce by Sayed
      by Y. Hashimi (Sep, 2008)
    0 讨论(0)
  • 2020-12-13 19:48

    The most compelling reason to use MSBuild (at least in .NET 3.5 and beyond) - the build engine can build concurrently.

    This means a huge speed up in your builds in you have multiple cores/processors.

    Previous to 3.5, MSBuild didnt do parallel builds.

    0 讨论(0)
提交回复
热议问题