I am trying to upgrade an app to 200.6. The app is .NET 8.0, 8.0.100
When I try to load a view with MapView in it the application crashes
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.DllNotFoundException: __Internal
at RuntimeCoreNet.GeneratedWrappers.CoreGeometryEditor.SetSnapChangedCallback(ICoreCallback_GeometryEditor_SnapChanged callback)
at Esri.ArcGISRuntime.UI.Editing.GeometryEditor..ctor(CoreGeometryEditor coreReference)
at Esri.ArcGISRuntime.UI.Editing.GeometryEditor..ctor()
at Esri.ArcGISRuntime.Maui.MapView..ctor()
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Constructor(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
at System.RuntimeType.CreateInstanceMono(Boolean nonPublic, Boolean wrapExceptions)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.Maui.Controls.Xaml.CreateValuesVisitor.Visit(ElementNode node, INode parentNode)
at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode)
at Microsoft.Maui.Controls.Xaml.ElementNode.Accept(IXamlNodeVisitor visitor, INode parentNode)
at Microsoft.Maui.Controls.Xaml.RootNode.Accept(IXamlNodeVisitor visitor, INode parentNode)
at Microsoft.Maui.Controls.Xaml.XamlLoader.Visit(RootNode rootnode, HydrationContext visitorContext, Boolean useDesignProperties)
at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, String xaml, Assembly rootAssembly, Boolean useDesignProperties)
at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, String xaml, Boolean useDesignProperties)
at Microsoft.Maui.Controls.Xaml.XamlLoader.Load(Object view, Type callingType)
at Microsoft.Maui.Controls.Xaml.Extensions.LoadFromXaml[MapViewRegion](MapViewRegion view, Type callingType)
at gMobile.Framework.UI.Map.MapViewRegion.InitializeComponent() in /Users/jhershman/repos/gMobile/src/gMobile.Framework.UI/obj/Debug/net8.0-ios/Microsoft.Maui.Controls.SourceGen/Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator/Map_MapViewRegion.xaml.sg.cs:line 42
at gMobile.Framework.UI.Map.MapViewRegion..ctor(IEventAggregator eventAggregator, ILocationProvider locationProvider) in /Users/jhershman/repos/gMobile/src/gMobile.Framework.UI/Map/MapViewRegion.xaml.cs:line 22
Everything works perfect in 200.5. I know there are changes to GeometryEditor in 200.6, but I don't see anything mentioning changes required in the Release Notes
Solved! Go to Solution.
My solution consists of multiple projects. I went through and manually deleted the bin/obj folder in the projects. I had cleaned but I think the 200.5 dlls must have been hanging around somewhere.
After this things are working.
My solution consists of multiple projects. I went through and manually deleted the bin/obj folder in the projects. I had cleaned but I think the 200.5 dlls must have been hanging around somewhere.
After this things are working.