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 1868228
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:39:29+00:00 2026-05-17T06:39:29+00:00

I am trying to develop a plugin architecture in .Net. The application will be

  • 0

I am trying to develop a plugin architecture in .Net. The application will be a .Net application. There will be directories which holds the plug-ins. Each directory will represent a plugin. Each plugin directory will also contain all the dependency dlls as well. The plugins need to be stored in separate AppDomain as the plugins may use the same assemblies, but different versions.

As it iterates through the foreach loop in Init(), I get a
System.IO.FileNotFoundException : Could not load file or assembly ‘[Assembly Name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
in _apDomain.Load() for assemblies that are not in the main project.

Code:

    readonly private AppDomain _appDomain;
    internal ItemModuleAppDomain()
    {
        AppDomainSetup info = AppDomain.CurrentDomain.SetupInformation;
        _appDomain = AppDomain.CreateDomain("ChildDomain");
    }

    public void Init(string dllDir)
    {
        string[] dlls = Directory.GetFiles(dllDir, "*.dll", SearchOption.TopDirectoryOnly);
        foreach(string dll in dlls)
        {
            _appDomain.Load(AssemblyName.GetAssemblyName(dll));
        }

Any idea why? I tried several methods such as reading the assembly as an array of bytes to load.

  • 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-17T06:39:30+00:00Added an answer on May 17, 2026 at 6:39 am

    I believe AppDomain.Load may be a wrong method for your purpose – it loads the assembly into both current app domain as well as target domain. And you get an error because your assembly is located in a sub folder and .NET does not know about it. You have to give private paths in configuration (http://msdn.microsoft.com/en-us/library/15hyw9x3.aspx). You can also use AssemblyResolve or TypeResolve event of AppDomain for resolution.

    You should also look at AppDomain.CreateInstanceFrom method to load your main plugin type (and containing assembly).

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

Sidebar

Related Questions

I am trying to develop a simple map application, which will display a map
I'm trying to develop a small plugin that will do a sort-of auto-completion along
I am trying to develop an application for my localhost on which I can
I am trying to develop a firefox plugin, which should be executed, whenever a
I'm trying to implement a plug-in like application. I know there are already several
I'm trying to develop a JQuery plug-in that will access an outside XML feed
I am trying to develop a plugin system, which provides a interface to load
I am trying to develop a concept for a simple algorithm which will turn
I'm trying to develop an application server that will deliver content to a core
I'm trying to develop a plugin for Eclipse that will allow me to modify

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.