I have an add-in that uses Gdal (c# bindings) version 3.8.5 which works in ArcGIS Pro 3.3, 3.4, and 3.5, but after upgrading to 3.6, I run into a conflict when registering Gdal, I assume due to a Gdal change in Pro. I have a previous post about this (https://community.esri.com/t5/arcgis-pro-sdk-questions/gdal-conflict-in-pro-3-6/m-p/1673418 ), but I want to add more information because I haven't been able to resolve this and it's becoming a huge issue.
I have checked the "load add-ins side-by-side" option and this doesn't help. Changing to a newer version of Gdal also doesn't help - this approach has worked in the past.
The error message I get when registering Gdal is:
The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception. System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
---> System.DllNotFoundException: Unable to load DLL 'gdal_wrap' or one of its dependencies: The specified procedure could not be found.
This issue has previously been referred to as "DLL **bleep**", and there are similar issues going back a very long time with Gdal in ESRI products. And yes, gdal_wrap does exist in the version of Gdal I'm using and I've updated the "PATH" environment variable to point to its location.
The ArcGIS Pro paths in the "PATH" environment variable seem to be different in 3.6, and this might have something to do with the issue I'm having.
I have over 10 thousand of lines of Gdal c# code in my add-in, so changing this is really not an option.