Microsoft’s build engine, MSBuild, has been published as open source on GitHub and will be ported to Linux and the Mac.
A build engine is used by developers to compile libraries and applications from source code. Using MSBuild, developers can define the build process in XML files, including pre-processing, compilation and post-processing.
Large applications have complex build processes, so easily managed automation is essential. Visual Studio uses MSBuild, though developers may not be aware of it unless they need to customise what the IDE does on their behalf.
The thinking behind making MSBuild open source is that it can be ported to other platforms. Announcing the move, Microsoft’s Rich Lander said:
“We will be adding Linux and Mac support soon (perhaps with your help!) so you can use MSBuild to build the open source .NET projects on your preferred platform. We'll initially start with Mono and look to port the code to run on .NET Core.”
.NET Core is the new open-source version of Microsoft’s .NET Framework, while Mono is the old open-source implementation led by Miguel de Icaza.
One of the issues with cross-platform .NET is that Visual Studio only runs on Windows, and with many developers using Macs or perhaps Linux as their primary development platform, this is a barrier to adoption.
“I think that we need MSBuild. You will need MSBuild to maintain, develop and extend software on Unix and participate in the larger ecosystem. While Mono has an implementation, it is a trivial one, and it is lacking too many features,” said de Icaza in a forum post last year. “While I am not a fan of MSBuild or XML file formats, the reality is that MSBuild is as encroached in the .NET ecosystem as the '.dll' extension is.”
Now de Icaza has his wish, though some .NET Core developers have argued for a new cross-platform build system using C# rather than XML – such as the existing Cake project.
MSBuild was introduced with Visual Studio 2005, in an era when XML everywhere was cool. That is no longer the case, but with so many MSBuild files out there, it is now hard to escape.
Visual Studio will never be a cross-platform IDE, but efforts like these will streamline .NET coding on other platforms, and what they lack in terms of features is mitigated by lack of bloat, giving fast start-up and performance. ®