0

Is it possible for my application to monitor a folder that if we copy a DLL (library) in it, the application will pick it up and link it?

I did a similar thing in C++ back in the days but is it possible to dynamically link a library in .NET?

Thanks

1
  • I gave points to each, setting the answer to the fastest one.. Commented Jan 5, 2010 at 19:47

2 Answers 2

1

Using reflection you could.

Poll the directory for added files, and then if you find one, load it using reflection and run some Main method inside it.

However you can't "unload" these DLLs unless they are loaded into seperate AppDomains.

Sign up to request clarification or add additional context in comments.

Comments

1

Absolutely. See this SO question or consider using the MEF.

1 Comment

MEF looks promising, haven't had a chance to play with yet though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.