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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:34:36+00:00 2026-05-27T14:34:36+00:00

Imagine this scenario: var ass1 = Assembly.LoadFrom(@C:\Work\3.59\assembly1.dll); var ass2 = Assembly.LoadFrom(@C:\Work\3.60\assembly1.dll); Debug.Assert(ass1 != ass2);

  • 0

Imagine this scenario:

var ass1 = Assembly.LoadFrom(@"C:\Work\3.59\assembly1.dll");
var ass2 = Assembly.LoadFrom(@"C:\Work\3.60\assembly1.dll");

Debug.Assert(ass1 != ass2);

The above assert fails. It seems the second call returns the first assembly even if the two assemblies above have different versions and locations.

The assemblies are not stong-named and can’t be signed.

Is there a way to force the framework to load them in the same context and domain?

  • 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-27T14:34:37+00:00Added an answer on May 27, 2026 at 2:34 pm

    Use Assembly.LoadFile(path) instead.

    From MSDN

    The LoadFrom method has the following disadvantages. Consider using
    Load instead.

    If an assembly with the same identity is already loaded, LoadFrom
    returns the loaded assembly even if a different path was specified.

    From CLR developer Suzanne Cook’s blog:

    If the assembly is not strongly-named, then the version is ignored for
    binding. But, if it is strongly-named, the entire version in the
    assembly reference needs to match the found assembly.

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

Sidebar

Related Questions

Let's imagine this scenario Running Dropbox in my Windows Work PC, my Windows Home
Imagine this scenario: You have a desktop and a laptop. The desktop has a
So imagine this scenario, I have a list and it has a bit of
So imagine this scenario: 10.00: your app pushes a message Hello 10.01: your app
Imagine I have this scenario in my Controller: def nr_1 = params.first_nr def nr_2
SCENARIO: Imagine a TABLE like this: Auto_INC, UserID_FK, CaseID_FK, Date idX userX caseX and
Imagine this scenario: you have a WCF web service that gets hit up to
Imagine this scenario: I have three tables in my database: Products , Users and
Imagine this scenario: class Page {} class Book { private $pages = array(); public
Imagine this scenario: Alice and Bob both clones a central master Mercurial repository, containing

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.