Friday, March 14, 2008

MSBuild

For every development environment there is, it must be found someway to make the command line build for large projects. For example, for the GNU C++, there is the make files, that are actually some form of command script automation to perform some tasks, and this is used to make the compilation of the projects in GNU C++. For the Microsoft Visual Studio .NET, MSBuild is the method you can use to perform the command line build, and that's what we care to speak about today.

For every C# or VB project made by Visual Studio .net, MSBuild utility can be used to build, rebuild, or clean the whole project, just using the command line (like: MSBuild.exe MyProj.csproj /property: Configuration=Debug). Also, you can add tasks to the project files you have so that they can perform while building. This thing can actually be very helpful in the field of making some building events, like post or pre build events, or making some way for custom building for the projects). The MSBuild tasks can vary from very simple commands, like copying or deleting a file, to more complex tasks like Csc (using the command line building for C Sharp files), to even more and more complex tasks like MSBuild or VCBuild, to evenly custom tasks, the ones you make and provide a reference to their definitions. For more infromation about MSBuild, about MSBuild tasks, what are the built in ones, how to implement a task, or how to use them, please check the following references.

References

No comments: