Project .NET version: 6.0
I’m trying to replicate the OSM overlay sample on my app and when I try to insert a MapView (from ThinkGeo.UI.WinForms), after setting the map size, Visual Studio crashes and restarts.
Visual Studio version: 17.4.2
Output log:
[13:39:46.931174] warn: [Agregador]: Could not resolve type for System.ComponentModel.Design.Serialization.TypeCodeDomSerializer .
[13:39:47.667091] fail: [Agregador]: Unhandled exception. System.ArgumentOutOfRangeException: The value for the enumeration is not one of the valid values. (Parameter 'mapUnit')
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.ValidatorHelper.CheckGeographyUnitIsValid(GeographyUnit geographyUnit, String parameterName)
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.MapUtil.GetScale(GeographyUnit mapUnit, RectangleShape boundingBox, Double widthInPixel, Double heightInPixel, Single dpi)
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.MapUtil.bx0=(RectangleShape targetExtent, Single actualWidth, Single actualHeight, Double maximumScale, Double minimumScale, GeographyUnit mapUnit)
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.MapUtil.AdjustExtentByRestrictions(RectangleShape targetExtent, Single width, Single height, RectangleShape restrictExtent, Double maximumScale, Double minimumScale, GeographyUnit mapUnit)
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.MapViewBase.DrawCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType)
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.MapViewBase.Draw(RectangleShape targetExtent, OverlayRefreshType refreshType)
[13:39:47.667091] fail: [Agregador]: at ThinkGeo.Core.MapViewBase.MEU=(Object sender, EventArgs e)
[13:39:47.667091] fail: [Agregador]: at System.Windows.Threading.DispatcherTimer.FireTick()
[13:39:47.668088] fail: [Agregador]: at System.Windows.Threading.DispatcherTimer.<>c.<Restart>b__21_0(Object state)
[13:39:47.668088] fail: [Agregador]: at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
[13:39:47.668088] fail: [Agregador]: at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
[13:39:47.668088] fail: [Agregador]: at System.Windows.Threading.DispatcherOperation.InvokeImpl()
[13:39:47.668088] fail: [Agregador]: at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
[13:39:47.668088] fail: [Agregador]: at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
[13:39:47.668088] fail: [Agregador]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
[13:39:47.668088] fail: [Agregador]: --- End of stack trace from previous location ---
[13:39:47.668088] fail: [Agregador]: at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
[13:39:47.668088] fail: [Agregador]: at System.Windows.Threading.DispatcherOperation.Invoke()
[13:39:47.669087] fail: [Agregador]: at System.Windows.Threading.Dispatcher.ProcessQueue()
[13:39:47.669087] fail: [Agregador]: at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
[13:39:47.669087] fail: [Agregador]: at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
[13:39:47.669087] fail: [Agregador]: at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
[13:39:47.669087] fail: [Agregador]: at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
[13:39:47.669087] fail: [Agregador]: at Interop.User32.DispatchMessageW(MSG& msg)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
[13:39:47.669087] fail: [Agregador]: at System.Windows.Forms.Application.Run(ApplicationContext context)
[13:39:47.669087] fail: [Agregador]: at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.<>c__DisplayClass54_0.<StartUIThreadAsync>b__1()
[13:39:47.669087] fail: [Agregador]: at System.Threading.Thread.StartHelper.Callback(Object state)
[13:39:47.669087] fail: [Agregador]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
[13:39:47.670087] fail: [Agregador]: --- End of stack trace from previous location ---
[13:39:47.670087] fail: [Agregador]: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
[13:39:47.670087] fail: [Agregador]: at System.Threading.Thread.StartCallback()
[13:39:51.229073] warn: Cannot update selection in server process as Session is not connected.
[13:39:51.388274] warn: Cannot update selection in server process as Session is not connected.