MSBuild - on open source on github

    Today we are especially pleased to announce that MSBuild (probably the most frequently used and most mysterious in terms of documentation - approx. Transl.) Is now available on github and we are adding it to the .NET Foundation list ! The Microsoft Build Engine (MSBuild) is a platform for building applications. By invoking msbuild on your project or solution, you can organize and build your products in environments where MS Visual Studio is not installed. For example, MSBuild is used to build Open Source projects such as .NET Core Libraries and .NET Core Runtime .



    The MSBuild sources are laid out today and are almost identical to the version that comes with MS Visual Studio 2015, in which, however, you can notice several differences, as this is our first attempt to make an autonomous assembly of this project and in time, when we finally do it, these differences will not (ornately muddied the water with a pitchfork - approx. transl.). Keep in mind that currently you need to have MS Visual Studio 2015 installed in order to build the MSBuild project,

    In the near future we will add support for Mac and Linux (perhaps with your help!), So that you can use it to build projects based on .NET Core directly on Linux servers (I already present TeamCity agents installed on Slackware, which they collect and deploy to the neighboring ASP.NET 5 application FreeBSD hosting ... The picture “Have arrived”? In my opinion - this is our wonderful future, - approx. First of all, we'll start with Mono (i.e., Xamarin for Mac / Android / iOS), with an eye on the ability to quickly port to .NET Core. And, to be honest, we just started porting. We hope that among you there will be quite a few motivated craftsmen to help us with this task.

    Where to begin?


    To get started, you need to build an MSBuild project. To do this, as mentioned in the article, you need to install MS Visual Studio 2015. After that, it is enough to execute only three commands (provided git is installed):

    git clone https://github.com/Microsoft/msbuild.git
    cd msbuild
    build.cmd
    


    Console Application Build


    To build the application, first run the BuildAndRun.cmd script, which we included in the root of the repository. It will build all the sources and create a copy of the build output with everything you need (meaning msbuild itself). That is, run the command:

    BuildAndCopy.cmd bin\MSBuild true 
    


    Now, to build the simplest console application, try the following commands:

    cd ..\
    git clone https://github.com/dotnet/corefxlab
    .\msbuild\bin\MSBuild\MSBuild.exe .\corefxlab\demos\CoreClrConsoleApplications
    \HelloWorld\HelloWorld.csproj
    .\corefxlab\demos\CoreClrConsoleApplications\HelloWorld\bin\Debug\HelloWorld.exe
    




    Summarizing



    MSBuild is the default tool for building projects in Vusial Studio. By translating it to Open Source, we hope for a community feedback that will make it the best choice for any .NET developer on Linux and Mac.

    Also popular now: