Alex Rivera | Logout

Is it worth learning to use MSBuild?

Asked 2008-09-06T22:26:48.807
20

I simply wondered whether people thought it was worth learning to use the MSBuild syntax in order to customise the build process for a .net project, or whether it is really not worth it given the ease with which one can build a project using visual studio.

I am thinking in terms of nightly builds, etc., but then couldn't I use a scheduled event which uses the command-line build option built into VS? Are there superior tools out there?

Edit
Report

2 Answers

2

In a scenario such as yours, where you do not already have a build system, then yes, MSBuild is absolutely worth it. Not only can you use it for a variety of pre-build and post-build tasks (see Jicko Petiov's answer), but you can also integrate it nicely into a continuous integration environment (such as CruiseControl).

One scenario where it might not be worth it is when you already have an automated/scripted build system in place. For example, I myself haven't taken the time with MSBuild because I've been using NAnt for this task since before MSBuild existed ...

answered 2008-09-22T21:56:05.307
1

If you develop in .net workshop, It does worth learning.
I have integrated our build process with Jenkins - originally Hudson. As it mentioned above, MSbuild has steep learning curve.However once you grasp the fundamentals, you can start customizing the build. my impression so far - could be naive, bulk of the script is consisted of

<PropertyGroup>
   <PropertyKey>value</PropertyKey>
</PropertyGroup>
<ItemGroup>
   <ItemListKey>List values<ItemListKey>
</ItemGroup>
<Task Source="" Target="" />
    Besides using for build, I successfully used MSBuild to create a module that manages
    configuration files such as web.config and foo.exe.config files. 
    it is a hybrid module that consists of .net console app, MSBuild script and batch file.
    what this module does is that during a project upgrade, it will create a XML transform       
    template with connection strings, endpoints and appSettings from old configuration
    files. 
    after the project has been upgraded, the module will transform newly deployed  
    configuration
    files without affecting any new entries. if you have dozens of configuration files this  
    is very effective. 
answered 2013-01-29T17:57:34.880

Your Answer