[Mono-devel-list] Assembly.Load() doesn't work with the GAC?

Lluis Sanchez lluis at ximian.com
Tue May 4 06:02:50 EDT 2004


To load from the GAC you have to provide the full assembly name,
including version. For ByteFX.Data it would be: ByteFX.Data,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756.

You can also use Assembly.LoadWithPartialName("ByteFX.Data"), but beware
that it is not defined which version will it return if there is more
than one. Most of the time you want a specific version, so Load() is a
better solution.

Lluis.


On dt, 2004-05-04 at 09:20, Gustav Schauwecker wrote:
> Is Assembly.Load able to load Assemblies from the GAC? The following program 
> throws a FileNotFoundException:
> 
> using System.Reflection;
> 
> class AssemblyTest {
>         public static void Main()
>         {
>                 Assembly.Load("ByteFX.Data");
>         }
> }
> 
> Software used: mono-0.91
> Gustl




More information about the Mono-devel-list mailing list