TranstecJasonD

Cannot create SpatialReference with 100.7 in .NET Core 3.1

Discussion created by TranstecJasonD on Jan 17, 2020
Latest reply on Jan 21, 2020 by TranstecJasonD

Title. Works fine in .NET Framework 4.8. Created a new project to double-check. Confirmed 100.6 does work.

Sub Main()
   Dim loSRS As SpatialReference
   loSRS = SpatialReference.Create(26915)
End Sub

System.InvalidOperationException
  HResult=0x80131509
  Message=Invalid Wkid value creating a SpatialReference.
  Source=Esri.ArcGISRuntime
  StackTrace:
   at Esri.ArcGISRuntime.Geometry.SpatialReference.CreateCoreCheckParams(Int32 wkid, Int32 vertId)
   at Esri.ArcGISRuntime.Geometry.SpatialReference.Create(Int32 wkid, Int32 verticalWkid)
   at Esri.ArcGISRuntime.Geometry.SpatialReference.Create(Int32 wkid)
   at ConsoleApp2.Module1.Main() in C:\Temp\ConsoleApp2\ConsoleApp2\Program.vb:line 7

 

Inner Exception 1:
TypeInitializationException: The type initializer for 'RuntimeCoreNet.GeneratedWrappers.CoreSpatialReference' threw an exception.

 

Inner Exception 2:
TypeLoadException: Could not load type 'System.Windows.DependencyProperty' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Outcomes