📜 ⬆️ ⬇️

MSBuild - in 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 calling msbuild on your project or solution, you can organize and assemble your products in environments where there is no installed MS Visual Studio. For example, MSBuild is used to build open source projects such as .NET Core Libraries and .NET Core Runtime .



Kernel, libraries, migration to Mac / Linux, msbuild ... A little more and I will check the output on github MS Visual Studio.

The MSBuild source is laid out today and is almost identical to the version that comes with MS Visual Studio 2015, in which, however, several differences can be noticed, since this is our first attempt to make an autonomous build of this project and with the time when we all finally do, these differences will not become (ornately stirred up the water with a pitchfork, - approx. transl.). Keep in mind that you currently need to have MS Visual Studio 2015 installed to build the MSBuild project,
')
In the very near future, we will add support for Mac and Linux (perhaps with your help!), So you can use it to build projects based on .NET Core directly on Linux servers (I already represent TeamCity agents installed on Slackware collect and deploy to the neighboring FreeBSD hosting ASP.NET 5 application ... Picture “Arrived”? In my opinion, this is our beautiful future - approx. transl.). First we start with Mono (i.e. Xamarin for Mac / Android / iOS), with an eye to the possibility of fast porting to .NET Core. And, if to admit, we just started porting. We hope that among you there are 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 stated in the article, you need to install MS Visual Studio 2015. After that, it’s enough to execute all three commands (provided that git is installed):

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


Build a console application


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

 BuildAndCopy.cmd bin\MSBuild true 


Now, to build a simple 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. Through translating it into Open Source, we hope for feedback from the community, which will make it the best choice for any .NET developer on Linux and Mac.

Source: https://habr.com/ru/post/253591/


All Articles