I have added to my add-in a nuget package for Npgsql.
I am working with Pro 2.6.2
The latest verison i.e.
NuGet\Install-Package Npgsql -Version 6.0.7
when I get to the code that starts to try to connect to my DB, I get thrown the error: Exception thrown: 'System.IO.FileNotFoundException' in Npgsql.dll.
Can you please look into this.
It may have something to do with this error - that it can't find the correct version assembly for System.Runtime.CompilerServices.Unsafe, I believe the one installed by default is version 6:
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.
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:
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.
Leads me to wonder if u have the correct version of the System.Threading.Tasks.Extensions and System.Runtime.CompilerServices.Unsafe Nugets installed in addition?
If only it were that simple - you just end up screwing up the whole project. There is some dependency conflict going on here - and I've spent far too long trying to find out what's going on here.