Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xabuild] Reference missing assembly for newer Mono versions (dotnet#…
…1976) Context: dotnet#1975 Mono 2018-04 (or 5.14.x) has some changes to MSBuild assemblies that cause failures such as the following when using `xabuild.exe`: /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2126,5): error MSB3248: Parameter "AssemblyFiles" has invalid value "xamarin-android/bin/Debug/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll". Could not load file or assembly 'System.Reflection.Metadata, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Mono: The following assembly referenced from monodroid/external/xamarin-android/bin/Debug/bin/Microsoft.Build.Tasks.Core.dll could not be loaded: Assembly: System.Reflection.Metadata (assemblyref_index=7) Version: 1.3.0.0 Public Key: b03f5f7f11d50a3a It appears that the Mono version of MSBuild has its own copy of `System.Reflection.Metadata.dll`. Referencing this MSBuild-specific assembly from `xabuild.csproj` on non-Windows platforms appears to fix the above errors.
- Loading branch information