Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 619395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:39:02+00:00 2026-05-13T18:39:02+00:00

I am working on an app that will load plug-ins. The plug-in assemblies reside

  • 0

I am working on an app that will load plug-ins. The plug-in assemblies reside in a directory that is below my app’s main directory.

Looks like this:

MyAppFolder
----------->ThePluginFolder
----------------Assembly1
----------------Dependency1

My problem occurs with Dependency1 (this is an assembly that Assembly 1 references). The CLR fails to find it.

I have done some reading on Fusion, and it looks as though I could correct this by setting a Private Path with currentAppDomain.AppendPrivatePath.

However, in the .NET 4.0 help, they say that this method is obsolete. They point me to the AppDomainSetup, but I can’t use that to modify my current app domain.
Does anyone know what else I can do to get these dependencies to load?

Options I’ve considered:

  1. I could manually loop through Assembly1’s references, and if I find an assembly in the plug-in folder, I could manually load it. (seems like my best option, but I want to make sure I’m not missing anything)

  2. I could hook the AssemblyResolve event of my current domain (but this even looks weird — you return a value. Does that imply that it’s not multicast? I’m handling one aspect of plug-in (a business rule), what if another part of my app wanted plug-in reports? Would I need 1 global event handler?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:39:03+00:00Added an answer on May 13, 2026 at 6:39 pm

    Thanks for all the help, guys. In my case, I found that the best thing to do was to locate the plugins in my main application directory. Although I could ues Load() or LoadFrom() to load the assemblies in separate dirs (and it would appear to work), I later ran into serializtion problems (the referred to assembly had classes that need to be serialized and deserialized).

    I tried using LoadFrom() and Load(), supplying various evidence in the AssmblyName parameter. I even “manually” loading the assemblies that were referenced by my plug-ins. No amount of dynamic loading would make deserialization work (I got exceptions).

    I only found 3 ways to have my dynamically loaded plug-ins work with serialization:

    1. Use CurrentDomain.AppendPrivatePath to add a path to the directory that had my assemblies (this method is obsolete)

    2. Hook the ResolveAssembly event in the current AppDomain (this would have worked, but it gets called alot, and I don’t want to impact my application’s performance — note that I haven’t taken measurements, though).

    3. Just put the assemblies in my main directory. (this was the simplest solution, and the only argument against doing so was that the directory structure was not as tidy as my other options. So, all things considered. I took this route.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an app that will be using https, but we wanted to
I am currently working on a simple Silverlight app that will allow people to
I'm working on a Rails app that will contain information on a bunch of
I'm working on an app that grabs and installs a bunch of updates off
I'm working on an app that requires no user input, but I don't want
I'm working on an app that needs to intercept when a program tries to
I'm working on an App that talks to a serial port, and on my
First off, I'm working on an app that's written such that some of your
I'm working on a .NET WinForms app that needs to print a FEDEX shipping
I am working on a web app that uses Perl and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.