|     Blog    |     Wiki    |     Support

Define specific load path for NetTopologySuite.dll

I am developing a User Control for displaying maps by using your WpfMap object.
The user control is hosted inside an application written by our Client (we do not have control on that code)
I am using NetTopologySuite.dll and GeoAPI.dll from you distributed library.
To my understanding this dlls are not developed by ThinkGeo

The problem is that the application of our client (that consumes my user control) also uses this dlls for some other needs. They may also use some other version of NetTopologySuite.dll , GeoAPI.dll

We want to be able to specify the path location, in which we load the NetTopologySuite.dll , GeoAPI.dll from.
For now we can see that when creating an instance of WpMap, this dlls are been automatically looked for, and they must exist in the directory of the executable, which is not good enough.

How can define a specific location for loading this dlls?

Thank you


We cannot change the load path, but you can try this event:

AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

If any dll load failed, you can make it find other path to load the correct dll.

It’s a system API, you should want to find some sample code about how to use it.

Wish that’s helpful.



Thank you, I will try it.

For now my costumer insist that my user control will use the NetTopologySuite.dll , GeoAPI.dll that he uses in his main project. Is it safe to be done?

I use map “Map Suite Wpf Desktop” ver
This distribution package comes with:
NetTopologySuite.dll version
GeoAPI.dll version

My client uses the following version:
NetTopologySuite.dll version (date- 16.11.15)
GeoAPI.dll version (date - 16.11.15)

So Does your “Map Suite Wpf Desktop” ver is compatible with NetTopologySuite.dll, GeoAPI.dll

Thank you in advance


I am not sure whether our V9 is compatible with the newer version.

But if you can upgrade to use our V10 the version should be just the same like your client used.