22

I want to build a .net core project on Windows and Linux.

For Windows I use MSBuild, simply downloaded the Build Tools für Visual Studio 2017 from visualstudio.com.

But where do I get MSBuild for Linux from? Based on the GitHub Project site, it should be available on some Linux distributions (README.md). I do not want to compile it myself (for some reasons).

I do not want to use xbuild, but pure MSBuild.

user69453
  • 1,279
  • 1
  • 17
  • 43
  • 9
    Follow the guides at https://learn.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x , for .net core you invoke it with the command `dotnet msbuild` – nos Dec 27 '17 at 12:49
  • Thanks. Make this an answer, and I will accept it. – user69453 Dec 27 '17 at 13:02
  • 3
    BTW, if you use Mono 5.x, there is no more `xbuild`, and the command becomes a wrapper over `msbuild`. So yes, `xbuild` is gone for ever. – Lex Li Dec 27 '17 at 13:25
  • Ah, good to know :) – user69453 Dec 27 '17 at 13:35
  • Note that for now the msbuild bundled with Mono is different than the msbuild included with the dotnet sdk. The version bundled with mono supports targeting the .NET framework while the msbuild bundled with dotnet does not. See https://github.com/dotnet/sdk/issues/335 – Rotsiser Mho Jul 10 '18 at 20:03
  • 2
    Possible duplicate of [How to install MSBuild on OS X and Linux?](https://stackoverflow.com/q/32546121/608639) – jww Aug 17 '19 at 00:20
  • @jww you are right, but I'd say the answers here are way better than the question you linked to ;) Furthermore the answer in the link is a bit outdated. Therefore I would keep this question here and its answers. – user69453 Aug 18 '19 at 09:03

1 Answers1

16

You can obtain .NET Core SDK as described in these URLs.
It is divided for each linux distribution.

RHEL
Ubuntu
Debian
CentOS/Oracle
SLES/OpenSUSE


Updated:2019-03-19

.NET Downloads for Linux, macOS, and Windows
Select the tab for the desired OS and then download.

related.
Microsoft/msbuild
msbuild/documentation/wiki/Building-Testing-and-Debugging-on-.Net-Core-MSBuild.md

Getting .Net Core MSBuild binaries without building the code
The best way to get .NET Core MSBuild is by installing the .NET Core SDK, which redistributes us. This will get you the latest released version of MSBuild for .NET Core. After installing it, you can use MSBuild through dotnet build or by manual invocation of the MSBuild.dll in the dotnet distribution.

kunif
  • 4,060
  • 2
  • 10
  • 30