xamarin-macios/msbuild/Messaging/Xamarin.Messaging.Build
Rolf Bjarne Kvinge 18e2bef479
[msbuild] Fix creating Build.zip. (#16445)
We recently switched from building the msbuild tasks with 'msbuild' to use
'dotnet build' instead.

One difference between the two methods is that 'dotnet build' doesn't copy
referenced assemblies to the output path.

This turns out to be a problem because we zip up the output from the
Xamarin.Messaging.Build project, and expect it to contain everything required
to load the Xamarin.Messaging.Build assembly (this zip file is shipped with
our VS (Windows) support, and during remote execution copied to the connected
mac and then the build from Windows will load the assembly on the Mac in order
to do stuff on the Mac).

Another problem is that we include MSBuild assemblies from the
'$(MSBuildBinPath)' location, which is now different (we used to pick up
Mono's MSBuild assemblies, and that changed when we started building with
.NET).

In other words: because the Build.zip file stopped containing all the required
files to load Xamarin.Messaging.Build.dll, remote builds from VS stopped
working.

Ref: https://github.com/xamarin/xamarin-macios/pull/16418

Here we attempt to fix this by:

* Setting 'CopyLocalLockFileAssemblies=true'. This will copy referenced
  assemblies to the output directory.
* Explicitly referencing Mono's MSBuild assemblies instead of relying upon
  finding them in '$(MSBuildBinPath)'. At this point I believe it's fine to
  hardcode Mono's path, since it's unlikely we'll get any new Mono updates.
2022-10-25 22:29:08 +02:00
..
Handlers Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Properties Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
App.config [dotnet] Initial support for .NET6 from Windows (#10590) 2021-02-12 07:43:17 +01:00
BuildAgent.cs Updated Xamarin.Messaging to 1.8.25 (#16419) 2022-10-25 07:50:11 +02:00
BuildEngine.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
ITaskRunner.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
Program.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
TaskRunner.cs Set custom home env var from XMA Build Agent (#15571) 2022-07-25 20:53:25 -04:00
Xamarin.Messaging.Build.csproj [msbuild] Fix creating Build.zip. (#16445) 2022-10-25 22:29:08 +02:00
Xamarin.Messaging.Build.props [dotnet] Initial support for .NET6 from Windows (#10590) 2021-02-12 07:43:17 +01:00
mtbserver [dotnet] Initial support for .NET6 from Windows (#10590) 2021-02-12 07:43:17 +01:00