<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot create SpatialReference with 100.7 in .NET Core 3.1 in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292477#M3424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Title. Works fine in .NET Framework 4.8. Created a new project to double-check. Confirmed 100.6 does work.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Sub Main()
&amp;nbsp;&amp;nbsp; Dim loSRS As SpatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;loSRS = SpatialReference.Create(26915)
End Sub&lt;/PRE&gt;&lt;P&gt;System.InvalidOperationException&lt;BR /&gt;&amp;nbsp; HResult=0x80131509&lt;BR /&gt;&amp;nbsp; Message=Invalid Wkid value creating a SpatialReference.&lt;BR /&gt;&amp;nbsp; Source=Esri.ArcGISRuntime&lt;BR /&gt;&amp;nbsp; StackTrace:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Geometry.SpatialReference.CreateCoreCheckParams(Int32 wkid, Int32 vertId)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Geometry.SpatialReference.Create(Int32 wkid, Int32 verticalWkid)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Geometry.SpatialReference.Create(Int32 wkid)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ConsoleApp2.Module1.Main() in C:\Temp\ConsoleApp2\ConsoleApp2\Program.vb:line 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Exception 1:&lt;BR /&gt;TypeInitializationException: The type initializer for 'RuntimeCoreNet.GeneratedWrappers.CoreSpatialReference' threw an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Exception 2:&lt;BR /&gt;TypeLoadException: Could not load type 'System.Windows.DependencyProperty' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:18:11 GMT</pubDate>
    <dc:creator>JasonDick</dc:creator>
    <dc:date>2021-12-12T16:18:11Z</dc:date>
    <item>
      <title>Cannot create SpatialReference with 100.7 in .NET Core 3.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292477#M3424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Title. Works fine in .NET Framework 4.8. Created a new project to double-check. Confirmed 100.6 does work.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Sub Main()
&amp;nbsp;&amp;nbsp; Dim loSRS As SpatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;loSRS = SpatialReference.Create(26915)
End Sub&lt;/PRE&gt;&lt;P&gt;System.InvalidOperationException&lt;BR /&gt;&amp;nbsp; HResult=0x80131509&lt;BR /&gt;&amp;nbsp; Message=Invalid Wkid value creating a SpatialReference.&lt;BR /&gt;&amp;nbsp; Source=Esri.ArcGISRuntime&lt;BR /&gt;&amp;nbsp; StackTrace:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Geometry.SpatialReference.CreateCoreCheckParams(Int32 wkid, Int32 vertId)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Geometry.SpatialReference.Create(Int32 wkid, Int32 verticalWkid)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Esri.ArcGISRuntime.Geometry.SpatialReference.Create(Int32 wkid)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at ConsoleApp2.Module1.Main() in C:\Temp\ConsoleApp2\ConsoleApp2\Program.vb:line 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Exception 1:&lt;BR /&gt;TypeInitializationException: The type initializer for 'RuntimeCoreNet.GeneratedWrappers.CoreSpatialReference' threw an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Exception 2:&lt;BR /&gt;TypeLoadException: Could not load type 'System.Windows.DependencyProperty' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:18:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292477#M3424</guid>
      <dc:creator>JasonDick</dc:creator>
      <dc:date>2021-12-12T16:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SpatialReference with 100.7 in .NET Core 3.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292478#M3425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since .NET Core is only supported on Windows Desktop and relies on WindowsBase, make sure you use the enable those features in your project.&lt;/P&gt;&lt;P&gt;In .csproj, set the project SDK to:&lt;BR /&gt;&amp;lt;Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might also have to declare &amp;lt;UseWpf&amp;gt;true&amp;lt;/UseWpf&amp;gt; in a property group.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2020 19:30:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292478#M3425</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-01-21T19:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create SpatialReference with 100.7 in .NET Core 3.1</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292479#M3426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Argh, that worked. This sounds familiar. I was using a Console app since I was just doing performance testing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2020 19:47:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/cannot-create-spatialreference-with-100-7-in-net/m-p/292479#M3426</guid>
      <dc:creator>JasonDick</dc:creator>
      <dc:date>2020-01-21T19:47:32Z</dc:date>
    </item>
  </channel>
</rss>

