<?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 Re: Npgsql does not work with add-ins in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219943#M8863</link>
    <description>&lt;P&gt;I did a google on "Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.1.0.0". Quite a bit of chatter about getting the version right, etc,etc.&lt;/P&gt;&lt;P&gt;Leads me to wonder if u have the correct version of the System.Threading.Tasks.Extensions and&amp;nbsp; System.Runtime.CompilerServices.Unsafe Nugets installed in addition?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2022 16:32:05 GMT</pubDate>
    <dc:creator>CharlesMacleod</dc:creator>
    <dc:date>2022-10-07T16:32:05Z</dc:date>
    <item>
      <title>Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218210#M8817</link>
      <description>&lt;P&gt;I have added to my add-in a nuget package for Npgsql.&lt;/P&gt;&lt;P&gt;I am working with Pro 2.6.2&lt;/P&gt;&lt;P&gt;The latest verison i.e.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;NuGet\Install-Package Npgsql -Version 6.0.7&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;when I get to the code that starts to try&amp;nbsp; to connect to my DB, I get thrown the error:&amp;nbsp;Exception thrown: 'System.IO.FileNotFoundException' in Npgsql.dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please look into this.&lt;/P&gt;&lt;P&gt;It may have something to do with this error - that it can't find the correct version assembly for&amp;nbsp;System.Runtime.CompilerServices.Unsafe, I believe the one installed by default is version 6:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;System.AggregateException
  HResult=0x80131500
  Message=A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.
  Source=mscorlib
  StackTrace:
   at System.Threading.Tasks.TaskExceptionHolder.Finalize()

Inner Exception 1:
FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an update to this - it just looks like it doesn't work with ESRI add-in projects. I tried many different versions of Npgsql and all failed. Here are the results for the various versions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Version Npgsql 2.0.11 - "The authentication or decryption has failed."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 3.2.7 - "Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 4.1.9 - "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 4.1.8 - "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 5.0 - "Could not load file or assembly 'System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 5.0.5 - "Could not load file or assembly 'System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 5.0.2 - "Could not load file or assembly 'System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 6.06 - "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;LI&gt;Version Npgsql 6.03 - "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 04 Oct 2022 08:20:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218210#M8817</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-04T08:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218533#M8821</link>
      <description>&lt;P&gt;I really need help on this please. Anyone from ESRI?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 08:21:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218533#M8821</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-04T08:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218617#M8824</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you need earlier version of Npqsql&amp;nbsp; (5.0.15 or earlier) because your version needs .Net 6.0 or higher.&lt;/P&gt;&lt;P&gt;If I remember ArcGIS Pro 2.6 uses .NET Framework 4.8&lt;/P&gt;&lt;P&gt;Or you need to migrate to ArcGIS Pro 3.0 which uses&amp;nbsp; .Net 6.0&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic1.html" target="_self"&gt;https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic1.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 13:56:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218617#M8824</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-10-04T13:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218705#M8825</link>
      <description>&lt;P&gt;I'm kind of locked into the version I'm using because of end clients - but I tried the version you suggested - 5.0.15, and it failed in a similar way.&lt;/P&gt;&lt;P&gt;This is proving so exasperating. I can't even get the ODBC drivers to work either as&amp;nbsp; work around the Npgsql library.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 17:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218705#M8825</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-04T17:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218894#M8827</link>
      <description>&lt;P&gt;Try to check&amp;nbsp;&lt;SPAN&gt;Npqsql (5.0.15) reference properties. "Copy Local" property must be set to "True".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 05:18:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218894#M8827</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-10-05T05:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218925#M8829</link>
      <description>&lt;P&gt;"Copy Local" is the default when you install. But thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 12:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218925#M8829</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-05T12:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218929#M8830</link>
      <description>&lt;P&gt;If you just reinstalled&amp;nbsp;&lt;SPAN&gt;Npqsql from 6.0.7 to 5.0.15, then you need to cleanup packages.config.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After reinstall you would get something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;packages&amp;gt;
  &amp;lt;package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="Npgsql" version="5.0.15" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Buffers" version="4.5.1" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Collections.Immutable" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Diagnostics.DiagnosticSource" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Memory" version="4.5.4" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Text.Encodings.Web" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Text.Json" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Threading.Channels" version="6.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.ValueTuple" version="4.5.0" targetFramework="net48" /&amp;gt;
&amp;lt;/packages&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;If you cleanup packages.config and install&amp;nbsp;&lt;SPAN&gt;Npqsql 5.0.15 from scratch you would get:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;packages&amp;gt;
  &amp;lt;package id="Microsoft.Bcl.AsyncInterfaces" version="1.0.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="Npgsql" version="5.0.15" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Buffers" version="4.5.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Memory" version="4.5.3" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Text.Encodings.Web" version="4.6.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Text.Json" version="4.6.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Threading.Channels" version="4.7.0" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" /&amp;gt;
  &amp;lt;package id="System.ValueTuple" version="4.5.0" targetFramework="net48" /&amp;gt;
&amp;lt;/packages&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After reinstall your packages.config&amp;nbsp; keeps libraries which are incompatible with .Net 4.8.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 12:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1218929#M8830</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-10-05T12:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219059#M8833</link>
      <description>&lt;P&gt;Packages seem to right. I cleaned the cache - but no difference.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 18:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219059#M8833</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-05T18:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219245#M8837</link>
      <description>&lt;P&gt;Update&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried version 2.9 of Pro and still the same issues.&lt;/P&gt;&lt;P&gt;I then tried version 3.0.2 - and it works fine.&amp;nbsp; Not massively useful to me but at least its something.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 08:52:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219245#M8837</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-06T08:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219854#M8858</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;do you have any ideas guys why the postgres api does not work in version 2.x of Pro addins?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219854#M8858</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-07T14:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219943#M8863</link>
      <description>&lt;P&gt;I did a google on "Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.1.0.0". Quite a bit of chatter about getting the version right, etc,etc.&lt;/P&gt;&lt;P&gt;Leads me to wonder if u have the correct version of the System.Threading.Tasks.Extensions and&amp;nbsp; System.Runtime.CompilerServices.Unsafe Nugets installed in addition?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 16:32:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1219943#M8863</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2022-10-07T16:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Npgsql does not work with add-ins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1220272#M8869</link>
      <description>&lt;P&gt;If only it were that simple - you just end up screwing up the whole project.&amp;nbsp; There is some dependency conflict going on here - and I've spent far too long trying to find out what's going on here.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 08:47:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/npgsql-does-not-work-with-add-ins/m-p/1220272#M8869</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2022-10-10T08:47:23Z</dc:date>
    </item>
  </channel>
</rss>

