qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomas Restrepo (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-239) Use of assembly name vs. assembly path in AMQConnection.LoadTransportFromAssembly()
Date Wed, 03 Jan 2007 01:46:27 GMT
Use of assembly name vs. assembly path in AMQConnection.LoadTransportFromAssembly()

                 Key: QPID-239
                 URL: https://issues.apache.org/jira/browse/QPID-239
             Project: Qpid
          Issue Type: Bug
          Components: Dot Net Client
         Environment: .NET 1.1 and 2.0
            Reporter: Tomas Restrepo
            Priority: Minor

The third argument to AMQConnection.LoadTransportFromAssembly() is called "assemblyName",
suggesting that it should contain a partially or fully qualified assembly name. 

However, the argument value is actually used as an argument to Assembly.LoadFrom(), which
doesn't take an assembly name but an assembly path instead. The two are at odds with each

So, either the argument name is wrong (and it should be assemblyFilename instead) or the call
to Assembly.LoadFrom() should be replaced with a call to Assembly.Load() instead. Which one
is the correct fix will depend on what the original intentions of the code are and the expected

However, in general terms I'd recommend avoiding Assembly.LoadFrom() and use Assembly.Load()
instead to allow the runtime to do proper assembly loading resolution (including loading from
the GAC if necessary) and avoiding conflicts because of load contexts (Load() and LoadFrom()
load assemblies in different binding contexts which affects how dependencies are resolved
and loaded at runtime. Check out http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx
and http://www.gotdotnet.com/team/clr/LoadFromIsolation.aspx for the details of this).

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message