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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:39:19+00:00 2026-05-30T12:39:19+00:00

I’m trying to put my assembly in the GAC for performance reasons. It has

  • 0

I’m trying to put my assembly in the GAC for performance reasons. It has some code that binds to the AssemblyResolve event. However, since GAC’ing my assembly, the AssemblyResolve event handler is no longer hit when the source of the resolution is coming from my own GAC’d assembly.

In other words, my GAC’d assembly has a reference to XYZ.dll. Instead of having to redistribute it separately, my GAC’d assembly has XYZ.dll stored as an embedded resource that is loaded on startup. The assembly resolution handler returns the dynamically loaded instance of XYZ.dll. However, now that my assembly is GAC’d the AssemblyResolve event doesn’t fire for XYZ.dll at all.

I’m guessing it has to do with the load context being different…but I’m not sure how to deal with it. How can I get resolution to work now that my assembly is GAC’d?

  • 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-30T12:39:20+00:00Added an answer on May 30, 2026 at 12:39 pm

    Sure, this doesn’t work. The GAC is a DLL Hell counter-measure, it ensures that any app that relies on a specific version of a DLL gets the specific version of the DLL they asked for. Consistently, no matter what process asked for it. Allowing the dependencies of the GAC-ed DLL to be resolved in the probing path of the process would bring back DLL Hell in the worst possible way. It completely defeats the guarantee that the GAC provides, the DLL can now not be trusted to work consistently.

    This is not just subtle either, a basically scary scenario is where the base class of a derived class that’s defined in an assembly that’s GAC-ed is defined in a dependent assembly. What you hope to work will allow a completely different base class implementation. There are reasonable odds that the jitter won’t fall over if the base class isn’t too different. The actual outcome at runtime is quite miserable, the wrong code executes with few ways to diagnose why, especially to a user without a debugger. DLL Hell is a user nightmare, the person least capable of diagnosing and fixing the problem is the victim.

    The CLR categorically refuses to let you shoot the user’s foot this way. Yes, loading context is the key, Fusion is the underlying api.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.