Select to view content in your preferred language

Implement AssemblyLoadContext for Add-In Isolation in ArcGIS Pro SDK

342
2
02-26-2025 01:15 AM
Status: Open
Labels (2)
Johannes_Strahler
Emerging Contributor

We would like to request the implementation of AssemblyLoadContext in ArcGIS Pro to improve add-in isolation and prevent assembly version conflicts.

Currently, ArcGIS Pro loads all add-ins into the same AppDomain, which means that when different add-ins depend on different versions of the same third-party library (like Log4Net or Gdal), only the highest version is loaded and used globally. This behavior often causes versioning conflicts and runtime errors when activating add-ins that expect a different version of the library.

The lack of assembly isolation becomes particularly problematic in .NET 5+ because, unlike the .NET Framework, it does not support side-by-side loading of different assembly versions in the same AppDomain. This results in unpredictable behavior and compatibility issues for developers building add-ins for ArcGIS Pro.

By implementing AssemblyLoadContext, introduced in .NET Core, ArcGIS Pro could load each add-in in its own isolated context. This would allow add-ins to load and use their required library versions independently, without interfering with other add-ins. As a result, the stability and compatibility of add-ins would greatly improve.

We believe this enhancement would resolve the ongoing versioning conflicts and prevent similar issues with other third-party libraries in the future. It would also align ArcGIS Pro with modern .NET practices for assembly management and dependency isolation.

We appreciate your consideration of this request and look forward to seeing potential improvements in this area.

Thank you, Johannes Strahler, IP SYSCON

2 Comments
vanesch
RichardDaniels

So technically, it sounds like different versions of Microsoft Edge WebView2 Runtime (e.g. if you built against a static vs. evergreen install on your development machine) could result in different behavior or unforeseen compatibility errors.