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

  • Home
  • SEARCH
  • 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 6324507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:43:03+00:00 2026-05-24T16:43:03+00:00

I built an application in C# with this structure: SystemPath — MainApplication.EXE — API.dll

  • 0

I built an application in C# with this structure:

SystemPath

— MainApplication.EXE

— API.dll

— Modules

——- Module1.dll

——- Module2.dll

The MainApplication.exe has a referency to the assembly API.dll. And it uses the assemblies Module1 and Module2 by “Assembly.Load(dllFile)”.
The files Module1.dll and Module2.dll also needs the file API.dll.

So, they need the API.dll in same path they are and i need to put the file API.dll in both directories (SystemPath and Modules).

What i want is a way to tell the modules that the file API.dll is in that folder, when i’m loading it with the Assembly.Load.

I can’t use the Global Assembly Cache and can’t change this structure.

What can i do to solve this?

  • 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-24T16:43:04+00:00Added an answer on May 24, 2026 at 4:43 pm

    In your MainApplication.exe.config file, you can add a <probing> element that specifies a semicolon-delimited list of subdirectories that will be searched when an assembly is loaded. For example:

    <?xml version="1.0"?>
    <configuration>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <probing privatePath="Modules" />
            </assemblyBinding>
        </runtime>
    </configuration>
    

    With this in your configuration, you’ll be able to do an Assembly.Load or reference on Module1; and since your application root is still at the top-level, if Module1 does an Assembly.Load or reference to API.dll, it will get it from the top-level directory automatically.

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

Sidebar

Related Questions

I have this typical scenario. I have a smartclient application built on .net 2.0
This is a Windows Console application (actually a service) that a previous guy built
What do you think of the project structure for an opensource CMS application built
I would like to build an application that will run on a web, this
I built an application which displays the records from database in the window and
I have built an application in C# that I would like to be optimized
I have built an application that uses SQL Express 2005 and I want to
Suppose a large composite application built on several foundation components packaged in their own
I have a Winform application built with C# and .Net 2.0. I have a
I have a small ajax application built with php. Using phpMyAdmin I have set

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.