Menu

#34 Assembly.LoadFile not Assembly.LoadFrom

1.4.1.0
closed
9
2008-04-16
2008-04-04
No

Oatc\src\csharp\Gui\Core\AssemblySupport.cs

Currently use Assembly.LoadFrom(...)
Propose use Assembly.LoadFile(...)

LoadFrom has several issues and MS.Help proposes using Load(...) instead.

LoadFile(...) is like Load(...) except did does not need a fully qualified name, ie name culture, version etc.

The problem encountered is that if LoadFrom(...) is called for an assembly that has already been loaded (ie load two identical ILinkableComponent's into same composition) the first assembly is used and an additional one is NOT loaded. Hidden in the unofficial blog literature is the fact that types defined in a assembly are defined (below the CLR?) with some assembly details as well. So even if two types look identical when viewed with reflection code, they are still different. This messes up things like deserialisation and createinstance calls using types within the same process.

I have tried the fix on WSL code and seams to solve the problem. I need this fix implemented before InfoWorks v9.5 (Sept. 2008) to ensure are wrapping works OK.

Discussion

  • Adrian Harper

    Adrian Harper - 2008-04-04

    Logged In: YES
    user_id=1686294
    Originator: YES

    Committed proposed fix, svn #498

     
  • Jan Gregersen

    Jan Gregersen - 2008-04-16

    Logged In: YES
    user_id=1262901
    Originator: NO

    Adrian will make sure that this is fixed in the OpenMI-1.4.1-Dev branch on source forge.

     
  • Adrian Harper

    Adrian Harper - 2008-04-16
    • status: open --> closed
     
  • Adrian Harper

    Adrian Harper - 2008-04-16

    Logged In: YES
    user_id=1686294
    Originator: YES

    Fixed and committed

     

Log in to post a comment.

MongoDB Logo MongoDB