ThinkGeo.com    |     Documentation    |     Premium Support

Define specific load path for NetTopologySuite.dll

Hi
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

Hi,

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.

Regards,

Ethan

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 9.0.0.118
This distribution package comes with:
NetTopologySuite.dll version 1.7.3.31740
GeoAPI.dll version 1.1.0.0

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

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

Thank you in advance

Hi,

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.

Regards,

Ethan