This project is read-only.

Loading just local plugins

Jun 16, 2012 at 10:50 AM


I have a problem with loading plugins.  i made a simple test application with a simple form. then add a map and appmanager control to it. here is my code in Form1:


[Export("Shell", typeof(ContainerControl))]
private static ContainerControl Shell;

and in Form1 constructor:

Shell = this;

When i put just 'DotSpatial.Plugins.ExtensionManager.dll' file in plugins folder, it complains about Nuget. so i put 'NuGet.Core.dll' file in plugins folder too.

But this time my application try to  connect to '' and download ribbon bar plugin!

So how could i tell my application(or dotspatial controls) just load local plugins and extensions was founded in 'Application Extensions' and 'Plugins' folder ?


Jun 23, 2012 at 8:30 AM

Common guys, help me please!

I download source code(dotspatial-67567) and copy the demo map project main form into new project. then copy Plugins and Application Extensions folder beside my exe but still have the same problem:

My application wants to download Ribbon extension at launch!? :(

I just need few extension, most important one is webmap.

So what should i do to fix this?


Jul 3, 2012 at 4:45 PM

When an extension is loaded, we guarantee that it will be able to access an AppManager, IProgressHandler, and IHeaderControl.

So you need to include them, too, or the extension manager will try to help you out by downloading them.

This allows the developer to avoid checking whether these properties are null before each use. This means, however, that extensions fulfilling these requirements must be available. In DemoMap.exe implementations are included in the project itself as classes. In MapWindow 6, example implementations are included as extensions. You can use whichever suits you.


Jul 3, 2012 at 5:12 PM

So, if we just need GDAL, we have to take the ribbon,, menu, toolbar and the rest?

Jul 3, 2012 at 6:51 PM

Nope. See How to Support Loading Extensions (Loading GDAL)

Jul 3, 2012 at 7:21 PM

If you follow those instructions, it will download the ribbon and legend panels. If you put only GDAL in the Plugins folder, then it will error looking for IProgressHandler, and IHeaderControl..

Is DotSpatial moving to a application instead of a GIS library?

Jul 3, 2012 at 8:32 PM

I think there is something in DemoMap.exe code that prevent extension manager to download ribbonbar or any other plugins, but i'm not sure yet.

For now i'm trying to create my own toolbar and legend until this issue get solved.

Jul 3, 2012 at 9:55 PM
Edited Jul 3, 2012 at 9:56 PM

@shall it will download the ribbon and legend panels only because you include the extension manager (or another dll that requires them) in the Plugins, Application Extensions, or Extensions folder (again, see

@mese79  In DemoMap.exe implementations are included in the project itself as classes. This means they don't need to be downloaded.


There aren't any knows issues here, but if you have trouble with the documentation (at let us know so we can clarify the matter.

Jul 4, 2012 at 9:17 AM

Thanks mudnug for your answers.

But let me clarify my issue:

In my app i have a simple form with two controls: map and appManager contorls. and this is my form1_load code: appManager.LoadExtensions();

When i put any plugin in plugins folder i.e. 'DemoPlugin.dll', i'v got three messages: IdockManager, IProgressHandler, and IHeaderControl extension must be included...and my app runs without any plugin loaded.

Then i put 'DotSpatial.Plugins.ExtensionManager.dll' in plugins folder. this time my app needs Nuget plugin too or it crashes. after i put 'NuGet.Core.dll' in my plugins folder, the final problem comes: my app try to download ribbonbar and if there is no internet connection, my app crashes again.

So is there any resolution for this situation?

I'm trying to use 'included implementations' like DemoMap.exe. i hope this work for me.


Jul 4, 2012 at 2:48 PM

mese79. I have the same problem.

Jul 4, 2012 at 8:54 PM

The behavior you describe is exactly what is expected (and what the tutorials describe).


Are you asking if we can improve the situation where there is no internet connection?


See for more on extensions.

Jul 4, 2012 at 9:45 PM

Yes, if extension manager checks internet connection before start to downloading, could helps.

But i think there is two other options:

1. The extension manager should just load extensions in application plugins folder without trying to collect all extensions, and if dependency did not meet and there is no internet connection, so just doesn't load it!

2. Why not just include extension basic interface(IDockManager, IProgressHandler and IHeaderControl) in DotSpatial.Controls?

In this case, there is no need to include extension manager in plugins folder and the application itself try to load the local plugins and doesn't care about online ones.

Jul 4, 2012 at 11:14 PM

"Are you asking if we can improve the situation where there is no internet connection?"

That is not the issue. I want to load only some of the extensions. I certainly don't want the ribbon since I already have a UI.

Jul 5, 2012 at 10:34 PM

1. We're going to look at making a few adjustments to this.

2. These components are not included presently because that could preclude being able to use your own components. This hadn't been an issue since this is documented, but I'm curious if it is too difficult to drop in a dock manager etc. when you drop in the ExtensionManager.

Do you need us move the version in DemoMap out into a separate DLL, so this is more obvious? We kept them in so that DemoMap code illustrates the 'how to roll your own' with no extra DLL needed.

Jul 9, 2012 at 7:24 PM

I believe we have improved the source with the latest two checkins. Let us know if this helps.


One clarified the error message: A {0} extension must be included because a UI plugin was found. See

Jul 21, 2012 at 8:59 AM

I'm sorry for late reply. i'v been terribly busy...

Thanks for updates. now i can load extensions selectively without internet connection presence or any crashes. :)

Jul 23, 2012 at 6:27 PM

Thanks for the update. Hopefully slhall will let us know as well if things are working for him.

Oct 11, 2012 at 7:35 AM
Edited Oct 11, 2012 at 7:35 AM

im having the same issue......:(

no idea how to fix this

Sep 9, 2013 at 10:47 AM
Edited Sep 10, 2013 at 6:16 AM
^_^ Sorted. You need to make sure the extension manager dll is NOT in your project at all.