Consider: https://jenkins.mono-project.com/job/xamarin-android-debug/85/console
This was a bot that had an (ancient!) Mono 5.4.1.7 installed, and make prepare fails:
14:17:12 nuget restore Xamarin.Android.sln
...
14:17:57 msbuild /p:Configuration=Debug /p:AutoProvision=True /p:AutoProvisionUsesSudo=True /p:IgnoreMaxMonoVersion=False /v:d /restore "build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.csproj"
...
14:17:57 MSBUILD : error MSB1001: Unknown switch.
14:17:57 Switch: /restore
The problem is that make prepare calls nuget restore Xamarin.Android.sln, and -- depending on NuGet version -- this may call msbuild /restore. The msbuild included with Mono 5.4.1.7 didn't support msbuild /restore, hence the failure.
The "funny" thing is, we need to get past make prepare-external in order to get to make prepare-reps, which will build build-tools/dependencies/dependencies.csproj, check the installed mono version, and update the system mono if necessary.
Except this causes a circular dependency: we can't build dependencies.csproj until after we've run nuget restore, and we can't (necessarily) run nuget restore until we've gotten an updated Mono install.
We need to break this circular dependency, and the sanest way to do that is to move the current dependency checking logic out of MSBuild (sigh), and into something that doesn't depend on mono.
Consider: https://jenkins.mono-project.com/job/xamarin-android-debug/85/console
This was a bot that had an (ancient!) Mono 5.4.1.7 installed, and
make preparefails:The problem is that
make preparecallsnuget restore Xamarin.Android.sln, and -- depending on NuGet version -- this may callmsbuild /restore. Themsbuildincluded with Mono 5.4.1.7 didn't supportmsbuild /restore, hence the failure.The "funny" thing is, we need to get past
make prepare-externalin order to get tomake prepare-reps, which will buildbuild-tools/dependencies/dependencies.csproj, check the installed mono version, and update the system mono if necessary.Except this causes a circular dependency: we can't build
dependencies.csprojuntil after we've runnuget restore, and we can't (necessarily) runnuget restoreuntil we've gotten an updated Mono install.We need to break this circular dependency, and the sanest way to do that is to move the current dependency checking logic out of MSBuild (sigh), and into something that doesn't depend on mono.