Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Xamarin.Forms.Maps 1.3.4 wont build in Windows Phone when using Xamarin.Forms 1.3.5.
- It complains that its missing a dependency of Xamarin.Forms 1.3.4.
- This works fine on Android & iOS, since 1.3.5 is >= 1.3.4.
- The latest versions of Xamarin.Forms and Xamarin.Forms.Maps work fine together on a Windows Phone.
**Steps to Reproduce:**
Create a blank project with Xamarin Forms 1.3.5, add a small feature which uses Xamarin.Forms.Maps with version 1.3.4 and WindowsPhone will fail to compile with above error.
"Cannot resolve dependency to assembly"
Error 18 Cannot resolve reference assemblies. Please check the reference assemblies. Cannot resolve dependency to assembly 'Xamarin.Forms.Core, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. F:\test\MobileAdmin\Admin\O365Admin.WinPhone\MainPage.xaml O365Admin.WinPhone
Error 19 Cannot resolve reference assemblies. Please check the reference assemblies. Cannot resolve dependency to assembly 'Xamarin.Forms.Core, Version=184.108.40.206, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. F:\test\MobileAdmin\Admin\O365Admin.WinPhone\App.xaml O365Admin.WinPhone
When working with Windows Phone, allow Xamarin.Forms 1.3.5 to use Xamarin.Forms.Maps 1.3.4
**Build Date & Platform:**
- Xamarin.Forms 1.3.5
- Xamarin.Forms.Maps 1.3.4
(see private note)
I have checked this issue and observed that Xamarin.Forms.Maps 1.3.4 getting build error in Windows Phone when using Xamarin.Forms 1.3.5.
And Its working fine if I have used Xamarin.Forms.Maps 1.4.2 in Windows Phone when using Xamarin.Forms 1.4.3.
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Installed Version: Professional
Xamarin 3.11.666.0 (ebae43a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 220.127.116.11 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.Forms Intellisense 1.0
Provides intellisense for Xamarin.Forms in the XML editor.
Xamarin.iOS 18.104.22.168 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Visual Studio extension to enable development for Xamarin.iOS.
Xamarin.iOS Unified Migration 1.0
Automated migration for Xamarin iOS Classic projects to Unified
Early preview of Xamarin Test Cloud integration
Created attachment 11982 [details]
Patched WP80 Xamarin.Forms 22.214.171.12435 assemblies
## Primary problem
It turns out the core of the problem here is that Windows Phone's `CompileXaml` task  apparently uses different logic than the normal `csc` compile task to determine which assemblies are compatible with which other assemblies. That is why the problem only affects Windows Phone.
>  C:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Silverlight.WindowsPhone.Build.Tasks.dll
## Why does Xamarin.Forms.Maps 1.4.2 work with Xamarin.Forms 1.4.3?
- Xamarin.Forms.Core 126.96.36.19976 has an `AssemblyVersion` of "188.8.131.52"
- Xamarin.Forms.Maps 184.108.40.20659 references Xamarin.Forms.Core version "220.127.116.11"
- Xamarin.Forms.Core 18.104.22.16835 has an `AssemblyVersion` of "22.214.171.124"
- Xamarin.Forms.Maps 126.96.36.19932 references Xamarin.Forms.Core version "188.8.131.52"
In other words, Xamarin.Forms 1.4.x uses a less strict assembly versioning scheme than Xamarin.Forms 1.3.x.
In order to make Xamarin.Forms.Core 1.3.5 backwards compatible with Xamarin.Forms.Maps 1.3.4, we would need to change the `AssemblyVersion` and the reference so that they matched. As a "quick hack" to verify this, I used `ildasm` and `ilasm` to change the `AssemblyVersion` on all of the Xamarin.Forms 1.3.5 WP8 assemblies to "184.108.40.206".
I have attached the modified assemblies corresponding to Xamarin.Forms 220.127.116.1135 on this comment. They solve the problem in my tests.
You can unzip this folder and use it to replace `packages\Xamarin.Forms.18.104.22.16835\lib\WP80` to test the workaround.
## Additional notes
Setting aside the backwards compatibility question for a moment, I had no problem building the Windows Phone app using:
Xamarin.Forms.Maps 22.214.171.12435 + Xamarin.Forms 126.96.36.19935
I also did not have any trouble building with:
Xamarin.Forms.Maps 188.8.131.5237 + Xamarin.Forms 184.108.40.20637
I am still unclear on: why did the original customer want to use Xamarin.Forms.Maps 220.127.116.1132 rather than either of these Xamarin.Forms.Maps 1.3.5.x versions?
Resolving as answered for now, per comment 6. If needed we can discuss further and reopen the bug if appropriate.