UWP Xamarin.Forms.Forms.Init crashes in context of netstandard base library

Hi
I have a XF Project where i added a netstandard class library
In the class library I have a class
public class CLBaseClass
{
}

In my XF Project
public class XFDerivedClass : CLBaseClass
{
}

When I start the Uwp app it crashes at Xamarin.Forms.Forms.Init
When i remove public or replace it with internal at XFDerivedClass everything works fine.
I use the actual project template in vs2017 15.9.3, XF 3.3.0.967583

Posts

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    What is the exception you're crashing with?

  • grsgrsgrsgrs Member ✭✭
    • $exception {System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
      at Windows.UI.Xaml.ResourceDictionary.put_Source(Uri value)
      at Xamarin.Forms.Forms.GetTabletResources()
      at Xamarin.Forms.Forms.Init(IActivatedEventArgs launchActivatedEventArgs, IEnumerable`1 rendererAssemblies)
      at XFApp.UWP.App.OnLaunched(LaunchActivatedEventArgs e)} System.Runtime.InteropServices.COMException
  • grsgrsgrsgrs Member ✭✭

    It' easy toreproduce:
    VS2017 => New Project => Cross Platform => Xamarin.Forms
    then
    Add => New Project => .net Standard => class library

    to the class Library add this class
    public class BaseClassNetStandard
    {
    }

    reference class library in cross platform project

    to the cross platform project add this class
    public class DeriveClassNetStandard : BaseClassNetStandard
    {
    }

    Start uwp project > crash

    remove public or replace with internal at class DeriveClassNetStandard
    Start uwp project > ok

Sign In or Register to comment.