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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:34:39+00:00 2026-05-10T22:34:39+00:00

I am writing a .NET library that for various reasons cannot be registered in

  • 0

I am writing a .NET library that for various reasons cannot be registered in the GAC. This dll (let’s call it SDK.dll) depends on other DLLs in order to be loaded.

When writing a program that uses this SDK.dll, I noticed that my program failed loading the dll with a FileNotFoundException thrown. This happens because although I was able to find the referenced SDK.dll, the CLR failed to load its dependencies.

The only way I found to solve the problem is to ‘Copy Local’ the SDK.dll and all its dependencies (something I can’t do because of deployment problems), or compiling my program into the same directory as SDK.dll

Is there a way to tell SDK.dll where to look for it’s dependencies regardless of its location? Maybe a SDK.dll.config file can help?

  • 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. 2026-05-10T22:34:40+00:00Added an answer on May 10, 2026 at 10:34 pm

    You can handle this at runtime by subscribing to this event:

    AppDomain.CurrentDomain.AssemblyResolve 

    It’s fired when the runtime fails to resolve an assembly. In your event handler method, write your logic to find the assembly and load it using Assembly.LoadFrom(). It would look something like this:

    public SDKClass() {   AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(FindAssembly); }  private Assembly FindAssembly(object sender, ResolveEventArgs args) {   string assemblyPath = 'c:\PathToAssembly';   string assemblyName = args.Name.Substring(0, args.Name.IndexOf(',')) + '.dll';   string assemblyFullName = Path.Combine(assemblyPath, assemblyName);    Assembly theAssembly = Assembly.Load(assemblyFullName);    return theAssembly; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer There is Java keychain API, in that there's an implementation… May 11, 2026 at 12:31 pm
  • added an answer Use @% with the escape character clause: select * from… May 11, 2026 at 12:31 pm
  • added an answer To add to what Chad Birch said... In your login… May 11, 2026 at 12:31 pm

Related Questions

I am writing a .NET wrapper class for an existing native class which throws
I am writing a website with Visual Studio 2008 and ASP.NET 3.5. I have
I am writing a small app to teach myself ASP.NET MVC, and one of
I am writing a Silverlight client that interacts with an SQL database via ASP.NET
Maybe you can help me... I am writing a program in Windows Mobile that
I actually have two questions regarding the same problem but I think it is
Do you know of any .NET library which can decode several types of audio
I am current writing an application that will require multiple inserts, updates and deletes

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.