如何在OS X和Linux上安装MSBuild? [英] How to install MSBuild on OS X and Linux?

查看:402
本文介绍了如何在OS X和Linux上安装MSBuild?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在我的Linux笔记本电脑上安装MSBuild,以便可以构建我的C#OSS项目.我将如何去做呢?我遇到过一些指南,例如,这些指南建议安装MSBuild NuGet软件包,但它似乎没有官方或未得到积极维护.

I'm looking to install MSBuild on my Linux laptop so I can build a C# OSS project of mine. How exactly would I go about doing this? I've come across a few guides such as this which suggest installing the MSBuild NuGet package, but it doesn't seem official or actively maintained.

我可以从中安装MSBuild的官方软件包源吗?

Is there an official package source I can install MSBuild from?

推荐答案

是的, CoreFX团队作为MyGet提要.要安装,请在终端上运行它:

Yes, there is such a package hosted by the CoreFX team as a MyGet feed. To install, run this at a terminal:

#!/bin/sh

packageid="Microsoft.Build.Mono.Debug"
version="14.1.0.0-prerelease" # update as needed

mono path/to/nuget.exe install $packageid -Version \
    $version -Source "https://www.myget.org/F/dotnet-buildtools/"

# run MSBuild
mono $packageid.$version/lib/MSBuild.exe Foo.sln

从技术上讲,此方法仅应用于构建.NET Core存储库,但我将其用作非官方发布者的替代方法.

Technically this should be used only for building the .NET Core repos, but I'll take it as an alternative to an unofficial publisher.

源.

编辑:请注意,这仅在您的Mono版本为4.0.1或更高版本时有效.

Note that this will only work if your version of Mono is 4.0.1 or above.

这篇关于如何在OS X和Linux上安装MSBuild?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆