Figuring out what dlls another dll requires

B

Benny Raymond

I have my auto update and auto update/ download new plugins system
working. The only thing I'm missing now is the ability to "uninstall"
plugins that are currently installed.

Currently I'm shutting down my app and running a batch file behind the
scenes to delete the dll that corresponds to the plugin which the user
wants to uninstall, however if that plugin came with any other dlls,
they are currently not removed. What I'd like to do is check what dlls
that plugin requires, then make sure none of the other plugins require
those dlls prior to making the batch file. I'd also like to do this
without relying on the plugin creator to make a config file which lists
these dependencies.

Is there any way to do this?
 
N

Nicholas Paldino [.NET/C# MVP]

Benny,

I don't think that this is a good idea. The reason for this is that the
plug in probably references DLLs that you have no business deleting.

For example, pretty much every assembly in existence has a reference to
mscorlib.dll. The second-most referenced is probably System.dll. Do you
want to delete these? You can't. In reality, for your plug ins, you should
make the requirement that the plug in have references to private assemblies
(in the same directory as it) and thats it. This way, you can just delete
the directory.

Hope this helps.
 
B

Benny Raymond

Ya... I guess I never thought of the normal dlls that would be refrenced...

The main problem with seperate folders is that I required to set the
plugins up in the same domain as the program itself, which means that
the plugins folder is listed in the app.config inorder to load dlls from
there.

Guess I may have to rely on config files per plugin :(
 
N

Nicholas Paldino [.NET/C# MVP]

Benny,

There is no reason to have to do that. Rather, why not have your folder
for the plugins and then have each plugin have its own sub-directory? That
would be better, and you wouldn't have to have a separate config file for
each plugin (rather, they can have their own settings in the config file).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top