Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug][UWP] Loading wrong Xamarin.Forms.Core.dll #9652

Closed
kapsiR opened this issue Feb 20, 2020 · 1 comment
Closed

[Bug][UWP] Loading wrong Xamarin.Forms.Core.dll #9652

kapsiR opened this issue Feb 20, 2020 · 1 comment

Comments

@kapsiR
Copy link

kapsiR commented Feb 20, 2020

Description

It seems there is an issue with loading the wrong Xamarin.Forms.Core.dll on UWP which leads to a System.MissingMethodException or a compiler error Error CS0029 Cannot implicitly convert type 'Xamarin.Forms.Color' to 'System.Drawing.Color'.

This happens only on UWP.

Steps to Reproduce

  1. Create a new Xamarin Forms project (Only UWP necessary to reproduce)
    • Target .NET Standard 2.0
    • UWP-Target 16299
  2. Update to latest Xamarin Forms stable (4.4.0.991640)
  3. Add an implicit Color conversion from System.Drawing.Color to Xamarin.Forms.Color or the other way around

Expected Behavior

No exception or compiler error

Actual Behavior

  • When writing the Color conversion into the UWP-Project, then there is a compiler error.
  • When writing the Color conversion into the Xamarin class library, then there is a runtime error.
Method not found: 'System.Drawing.Color Xamarin.Forms.Color.op_Implicit(Xamarin.Forms.Color)'.

at MethodNotFoundRepro.App.App.TestBug() in \MethodNotFoundRepro\MethodNotFoundRepro.App\MethodNotFoundRepro.App\App.xaml.cs:line 22
   at MethodNotFoundRepro.App.App.OnStart() in \MethodNotFoundRepro\MethodNotFoundRepro.App\MethodNotFoundRepro.App\App.xaml.cs:line 16
   at Xamarin.Forms.Platform.UWP.WindowsBasePage.LoadApplication(Application application)
   at MethodNotFoundRepro.App.UWP.MainPage..ctor() in \MethodNotFoundRepro\MethodNotFoundRepro.App\MethodNotFoundRepro.App.UWP\MainPage.xaml.cs:line 24
   at MethodNotFoundRepro.App.UWP.MethodNotFoundRepro_App_UWP_XamlTypeInfo.XamlTypeInfoProvider.Activate_4_MainPage() in \MethodNotFoundRepro\MethodNotFoundRepro.App\MethodNotFoundRepro.App.UWP\obj\x86\Debug\XamlTypeInfo.g.cs:line 311
   at MethodNotFoundRepro.App.UWP.MethodNotFoundRepro_App_UWP_XamlTypeInfo.XamlUserType.ActivateInstance() in \MethodNotFoundRepro\MethodNotFoundRepro.App\MethodNotFoundRepro.App.UWP\obj\x86\Debug\XamlTypeInfo.g.cs:line 1407

Basic Information

  • Version with issue: 4.4.0.991220-pre3 (introduced with PR #7079)
  • Last known good version: 4.4.0.991210-pre2 or stable 4.3.0.991250
  • New known good version: 4.5.0.282-pre4 (working again with PR #9132)
  • IDE: VS 2019
  • Platform Target Frameworks:
    • UWP: >= 16299
  • Nuget Packages: NETStandard.Library, Xamarin.Essentials, Xamarin.Forms

Reproduction Link

XamarinMethodNotFoundRepro

Workaround

Use latest Xamarin Forms 4.5.0.282-pre4 or 4.4.0.991210-pre2 or the stable 4.3.0.991250

@kapsiR kapsiR added s/unverified New report that has yet to be verified t/bug 🐛 labels Feb 20, 2020
@samhouts samhouts added this to the 4.4.0 milestone Feb 20, 2020
@PureWeen
Copy link
Contributor

We're close to releasing 4.5 stable so for now we aren't planning on backporting the fix to 4.4

@PureWeen PureWeen removed the s/unverified New report that has yet to be verified label Feb 20, 2020
@samhouts samhouts added the 4.4.0 regression on 4.4.0 label Apr 14, 2020
@samhouts samhouts removed this from the 4.4.0 milestone Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants