I am using npgsql with my add-in, but I ran into a bug that is preventing me from upgrading past version 4.0.11 (the latest npgsql version is 5.0.10). The suggested workaround is to use assembly binding redirects in the app.config, but the ArcGIS add-in does not seem to use app.config file.
Is there a way to configure the add-in to use the app.config file?
If not, is there another way to set binding redirects?
I wrote out some steps to reproduce the problem. Any help would be appreciated!
1. Open Visual Studio and create a new ArcGIS Pro Module Add-in
2. Run ‘Install-Package Npgsql’ in the Package Manager Console.
3. Run ‘Update-Package’ in the Package Manager Console.
4. Initialize a new NpgsqlConnection:
var conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;Database=myDataBase;User Id=myUsername;Password=myPassword;");
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Threading.Channels, Version=22.214.171.124, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.'