問題描述
我希望在我的 Linux 筆記本電腦上安裝 MSBuild,以便構(gòu)建我的 C# OSS 項(xiàng)目.我該怎么做呢?我遇到了一些指南,例如 this 建議安裝 MSBuild
NuGet 包,但它似乎不是官方的或積極維護(hù)的.
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 團(tuán)隊(duì) 作為 MyGet 提要.要安裝,請(qǐng)?jiān)诮K端上運(yùn)行:
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
從技術(shù)上講,這應(yīng)該僅用于構(gòu)建 .NET Core 存儲(chǔ)庫(kù),但我會(huì)將其作為非官方發(fā)布者的替代方案.
Technically this should be used only for building the .NET Core repos, but I'll take it as an alternative to an unofficial publisher.
來源.
請(qǐng)注意,這僅適用于您的 Mono 版本為 4.0.1 或更高版本.
Note that this will only work if your version of Mono is 4.0.1 or above.
這篇關(guān)于如何在 OS X 和 Linux 上安裝 MSBuild?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!