dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.23k stars 1.35k forks source link

Fix mono build: Update msbuild used to bootstrap #1382

Closed radical closed 7 years ago

radical commented 7 years ago

The current build being used to bootstrap does not support $(MSBuildRuntimeType) == Mono, which breaks mono builds.

I have an existing build that works, but that is from April.

Sarabeth-Jaffe-Microsoft commented 7 years ago

@rainersigwald @AndyGerlicher

cdmihai commented 7 years ago

@radical Is the build you mentioned up to date? I can just upload that to our main repo releases and change cibuild.cmd to point to the new address.

radical commented 7 years ago

@cdmihai No, it is an old build in fact. The current xplat does not build with mono, but I can build it locally with a hack. So, I will upload a new .zip with it.

cdmihai commented 7 years ago

As far as I knew, the xplat branch can build three msbuild flavors, and each flavor requires a different bootstrap msbuild:

Are you saying that the Mono flavor no longer requires the Mono bootstrap msbuild?

rainersigwald commented 7 years ago

I think @radical is saying that the Mono flavor cannot currently be built with the old Mono bootstrapper. Plus I think there's another issue that was being chased down.

However, I can build the Mono flavor with desktop MSBuild--it'd be pretty great if we could get the bootstrap zip built that way and have it be less of a special snowflake! I have a patched private official build that builds Mono and copies the results to a share, but I haven't tried zipping it up and using it as the bootstrapper yet.

radical commented 7 years ago

Yeah, xplat cannot be built with the current Mono bootstrapper.

And the second issue is when referencing System.Secuirty.Principal.Windows in src/XMakeTasks/UnitTests/project.json, we end up with two references to the same "reference" assembly being passed to the compiler. And mcs seems to fail on that (https://bugzilla.xamarin.com/show_bug.cgi?id=49139), whereas csc works.

radical commented 7 years ago

Could we please use the build from my repo here to releases here? This and the PR #1462, would fix the mono build and then we can enable the mono CI. This can be a temporary thing and whenever we have a official build, like Rainer mentioned, then we can change this.

cdmihai commented 7 years ago

Copied it: https://github.com/Microsoft/msbuild/releases/tag/mono-hosted-msbuild-v0.03

I think you have to update the download URL in the cibuild.sh script right?

radical commented 7 years ago

Awesome, thank you! Yes, I have opened PR #1480 to update cibuild.sh .