Skip to content

Cannot deploy app in debug using hot restart (skiasharp issue) #3174

@jfversluis

Description

@jfversluis

Issue moved from dotnet/maui#28026


From @GBrienza on Tuesday, February 25, 2025 8:32:01 AM

Description

when trying to deploy the app using hot restart (windows11) I get an error about skia sharp

Steps to Reproduce

Using a maui app with SkiaShart.Extended.UI.Maui 2.0.0 you get

An error occurred: 'Could not resolve type with token 0100002b from typeref (expected class 'SkiaSharp.GRBackendRenderTargetDesc' in assembly 'SkiaSharp, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756')'. Callstack: ' at System.Reflection.MonoMethodInfo.GetParametersInfo(IntPtr handle, MemberInfo member)

upgrading to a preview version 3.0.0.0-preview.13 seems to fix it. @mattleibow any ideas .. I did create a noddy repo that I wanted to upload but in that noddy one it happened twice and then settled, in our production app that I cannot obviosly upload its all the time and the preview fixes it. any ideas - is there a chance to promote that preview to stable?

Link to public reproduction project repository

No response

Version with bug

9.0.30 SR3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

upgrading to a preview version 3.0.0.0-preview.13 seems to fix it. Can this made stable , it helps with internal policies.

Relevant log output

[0:] An error occurred: 'Could not resolve type with token 0100002b from typeref (expected class 'SkiaSharp.GRBackendRenderTargetDesc' in assembly 'SkiaSharp, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756')'. Callstack: '   at System.Reflection.MonoMethodInfo.GetParametersInfo(IntPtr handle, MemberInfo member)
   at System.Reflection.RuntimeConstructorInfo.GetParametersInternal()
   at System.Reflection.MethodBase.GetParametersAsSpan()
   at System.RuntimeType.FilterApplyMethodBase(MethodBase methodBase, BindingFlags bindingFlags, CallingConventions callConv, Type[] argumentTypes)
   at System.RuntimeType.FilterApplyConstructorInfo(RuntimeConstructorInfo constructor, BindingFlags bindingFlags, CallingConventions callConv, Type[] argumentTypes)
   at System.RuntimeType.GetConstructorCandidates(String name, BindingFlags bindingAttr, CallingConventions callConv, Type[] types, Boolean allowPrefixLookup)
   at System.RuntimeType.GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetConstructor(Type[] types)
   at Xamarin.iOS.HotRestart.Application.<>c.<ForceLoadingAssemblies>b__8_2(Type t)
   at System.Linq.Enumerable.ArrayWhereIterator`1[[System.Type, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Xamarin.iOS.HotRestart.Application.ForceLoadingAssemblies(Type formsDelegate, String contentFolder)
   at Xamarin.iOS.HotRestart.Application.Run(String[] args, Action`1 loadFrameworkAction, Action killApplicationAction)'
The app has been terminated.The app has been terminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions