Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MSBuild vs. nAnt

  • 13-12-2012 2:33pm
    #1
    Registered Users, Registered Users 2 Posts: 40


    Hi

    On a project I am toying with the idea of implementing 3 separate scripts that will assist in the build and deployment of the ASP.Net project I am currently working on.

    Indented "generic" scripts:
    1) Building and preparing packages for deployment. This is currently implement via nAnt, builds the project and prepares the ZIP archive. (Due to security policies and release procedures, direct publishing using MSBuild will not be possible.)
    2) Deployment - based on the environment, deploy to folders whatever is contained within ZIP, and make modifications to web.Config
    3) Validation - does a high-level sanity check on the installation, mock queries to the DB using connectionstrings configured in web.config to ensure connectivity, and do other actions related to the installation.

    I need something portable and highly script-able, so the decision is to either stick with nAnt or go with MSBuild. The problem is that both have dependencies for moving between different environments (nAnt - a seperate installation with nAnt libraries/executables, possibly contaminating UAT/PROD environments; MSBuild - community dependencies via NuGet to call on additional tasks). I would like scripting functionality without "overheads", which kinda makes me lean to MSBuild, because .Net framework already supports this. I am just not sure if MSBuild can be used for scripts (2) and (3).

    Does anyone have similar experience and suggestions?


Comments

  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Depends on what continuous integration suite you use.


  • Registered Users, Registered Users 2 Posts: 40 MidnightHawk


    srsly78 wrote: »
    Depends on what continuous integration suite you use.

    nAnt ATM.

    Still unclear if it is the best way forward tho.


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    nAnt is just a build tool, not a CI suite. What do you use to automate your builds?


  • Registered Users, Registered Users 2 Posts: 40 MidnightHawk


    srsly78 wrote: »
    nAnt is just a build tool, not a CI suite. What do you use to automate your builds?

    Lol k. No CI suite.

    I am working on a proposal to automate release and deploy. CruiseControl seems interesting ...


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    It's ****e :)

    Use Jenkins, it's free and better than everything else tbh. Better as in give you most freedom with plugins etc to use any tools you want.

    Why do you want to use ant anyway? You aren't doing cross platform development it seems. Stick to msbuild I would say. Java people will disagree ofc :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 40 MidnightHawk


    srsly78 wrote: »
    It's ****e :)
    Gotcha!
    srsly78 wrote: »
    Use Jenkins, it's free and better than everything else tbh. Better as in give you most freedom with plugins etc to use any tools you want.
    Cheers :)
    srsly78 wrote: »
    Why do you want to use ant anyway?
    Using nAnt, mostly because I am familiar with it.

    For the purposes of deploying into various environments (one cannot do it from one env to the next, they are physically segregated), I essentially want the build script to include a deploy script into the package that is to be deployed. If I can get away with using MSBuild that will use a "deployment manifest" as target, then that will suffice. Unfortunately I don't know enough about MSBuild to know whether this can be done.


  • Registered Users, Registered Users 2 Posts: 2,021 ✭✭✭ChRoMe


    srsly78 wrote: »
    It's ****e :)

    Use Jenkins, it's free and better than everything else tbh. Better as in give you most freedom with plugins etc to use any tools you want.

    Why do you want to use ant anyway? You aren't doing cross platform development it seems. Stick to msbuild I would say. Java people will disagree ofc :)

    Why the hate for cruise control?


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    Because it isn't Jenkins.

    Here is a a comparison from 3 years ago: http://stackoverflow.com/questions/604385/what-is-the-difference-between-hudson-and-cruisecontrol-for-java-projects

    In that time Jenkins (used to be called Hudson) has gotten a lot better, more people using it = more 3rd party plugins.


  • Registered Users, Registered Users 2 Posts: 11,989 ✭✭✭✭Giblet


    I use TeamCity myself, it's pretty awesome as well.


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    TeamCity is good, my current customer uses it. However it is not as good as Jenkins... and Jenkins is FREE.

    Consider that a TeamCity build agent licence costs $200, then consider that a Jenkins build agent costs nothing.

    So anyone choosing TeamCity over Jenkins in a new site is crazy.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Using MsBuild with Jenkins on the current project I'm working on. Liking it a lot so far.

    Never liked Cruisecontrol to be honest


  • Registered Users, Registered Users 2 Posts: 2,494 ✭✭✭kayos


    Jenkins? Great for Java.... not so good for .NET.

    You want your code coverage results as part of your build? Time to write the code to convert the results format and then use the emma plugin to get the results into the build. Unless things have changed in the past year.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    kayos wrote: »
    Jenkins? Great for Java.... not so good for .NET.

    You want your code coverage results as part of your build? Time to write the code to convert the results format and then use the emma plugin to get the results into the build. Unless things have changed in the past year.

    Nope, we're using NCrunch which gives us these metrics. It's an absolutely fantastic plugin for Visual Studio. I like it so much I bought myself a personal licence :)


  • Registered Users, Registered Users 2 Posts: 2,494 ✭✭✭kayos


    John_Mc wrote: »
    Nope, we're using NCrunch which gives us these metrics. It's an absolutely fantastic plugin for Visual Studio. I like it so much I bought myself a personal licence :)

    So when you do a build from Jenkins you can import the code coverage straight into your Build Report and the data is displayed in a meaningful way? If so cool pity it means you have to buy another product for that to work which goes against the "Jenkins is free" argument.


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    kayos wrote: »
    So when you do a build from Jenkins you can import the code coverage straight into your Build Report and the data is displayed in a meaningful way? If so cool pity it means you have to buy another product for that to work which goes against the "Jenkins is free" argument.

    Yeah the Line Coverage % is displayed beside the project in the Jenkins dashboard.

    NCrunch was free up until about a month ago but then went commercial.

    There may be other ways to get this information without needing to licence another application, I don't know as I'm not really involved in the C.I setup on my current project.


  • Registered Users, Registered Users 2 Posts: 851 ✭✭✭TonyStark


    Giblet wrote: »
    I use TeamCity myself, it's pretty awesome as well.

    +1

    Use MSBuild & nANT FTW!


Advertisement