tags:

views:

135

answers:

2

I have several class libraries containing some commands and auto-updaters for ArcGIS. Until now, each library contained an installer class, and we had a single Setup project that was in charge of installing all the dlls. Just like in here.
I have now created another library containing a Toolbar, that should contain all the commands we have. The project refrences the other projects, and the AddItem (From the BaseToolbar base class) is using the AddItem(Type type) overload, to have it all strongly typed and not just based on strings (for CLSID or names).
Naturally, the Toolbar project contains the insallter. I just wanted to know if it is a good idea to change the suggested installer implementation (from the above link), so that it will make sure all the commands' dlls will be registered (Iterating over dll files in the output folder, and registering them? Is there some better way?)
This will move the installation concern out of every command project, into a centralized place. I think it will be easier this way to add more commands, as I will only have to add a reference to them from the Toolbar project. Does that make sense, or should I stick to putting an installer in every project seperatly, and adding them to the Setup project one by one?

And another thing - is there an easy way to find where several commands are coming from, inside the ArcMAP? I have some strange categories there (Created by past users on this machine), with old commands that I'd like to remove.

A: 

I think it makes sense. You just have to be sure that everything is in the right place when the installer (as in Wise, installshield, etc.) invokes RegisterAssembly and UnregisterAssembly on your installer assembly. For example, if the uninstall removes your "command" assemblies prior to calling UnregisterAssembly that could be a problem. I think you just have to test it to find out. As long as you know that all the "command" assemblies will be available, it seems like it would work ok.

You could also solve it by just including the common installation code in a separate common assembly and implement the installer classes always.

Skrymsli
A: 

A Better and convenient workflow would be to have all the commands ect in one library/assembly itself. This way you have only one dll to register.

As for finding the dlls that other custom tools are coming from: There is a trick. Debug any custom ArcGIS extension or sample, which runs ArcMap. Keep a lookout on the Output Window in Visual Studio. This will give you a list of all dll's that are loaded by ArcMap

dev
Yeah, I know we should have made a single Commands dll for all our commands. Should have is the key word :-)thanks for the vs tip. I will look at that list.
Noam Gal