[Mono-list] Assembly.LoadFrom() - Assembly.CreateInstance() - Activator.CreateInstanceFrom() ---> invalid cast

Jonathan Pryor jonpryor@vt.edu
Mon, 26 Jan 2004 18:01:15 -0500


Response below...

On Mon, 2004-01-26 at 11:12, Jaroslaw Kowalski wrote:
<snip/>
> BTW. .NET 1.1 supports a transparent assembly redirection for system
> assemblies. i.e. when you ask for
> 
> Type.GetType("System.Data.SqlClient.SqlConnection, System.Data,
> Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
> 
> you're gonna get the same thing as.
> 
> Type.GetType("System.Data.SqlClient.SqlConnection, System.Data,
> Version=1.1.4322, Culture=neutral, PublicKeyToken=b77a5c561934e089")
> 
> instead because MS "knows" this latter type is backwards compatible (this
> applies to all assemblies located in Microsoft.NET\Framework\v1.1.4322) .
> This is a new behaviour introduced in .NET 1.1 to eliminate unneccessary
> assembly redirections.
> 
> Note that .NET 1.0 behaves differently here (it will let you two
> System.Data's from two CLR versions provided that they are in the GAC)
> 
> Does mono support this?
> 
> Jarek

Not yet.  This support requires the GAC (Global Assembly Cache), which
is still being implemented under Mono.

And once Mono gets a GAC, it will probably need to behavior closer to
.NET 1.1, with the transparent assembly redirects, so that .NET
assemblies can be redirected to Mono-provided assemblies.

 - Jon