Home All Groups Group Topic Archive Search About

Problems in loading a Non-GAC version of Assembly

Author
1 Aug 2006 8:37 PM
Amruta
Hi,
I have an Assembly version 1.1.8.1 in the GAC.My problem is that I want
to use an assembly with the same version outside GAC.
I have tried using <codebase> element by specifying the path to the
required Assembly,but the CLR is still loading the Assembly from the
GAC.
<configuration>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="AssemblyTest"
publickeyToken="ebf3388bf6e61e92" culture="neutral"/>
            <codebase version="1.1.8.1" href="FILE://C:/......dll"/>
        </dependentAssembly>
    </assemblyBinding>
</configuration>

Any advice or tips would be greatly appreciated.
Thanks in Advance.

Author
5 Aug 2006 2:05 PM
Kumar Reddi
CLR first searches the GAC when trying to load an assembly.. I am not really
sure you can load a strong named assembly with the same version from a
private folder if its allready installed in GAC.

But I heard some folks were able to achieve this with "LoadWithPartialName"
method in 1.1. You might wanna give a try

Show quote
"Amruta" <amruta.chit***@gmail.com> wrote in message
news:1154464664.412270.231120@75g2000cwc.googlegroups.com...
> Hi,
> I have an Assembly version 1.1.8.1 in the GAC.My problem is that I want
> to use an assembly with the same version outside GAC.
> I have tried using <codebase> element by specifying the path to the
> required Assembly,but the CLR is still loading the Assembly from the
> GAC.
> <configuration>
> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> <dependentAssembly>
> <assemblyIdentity name="AssemblyTest"
> publickeyToken="ebf3388bf6e61e92" culture="neutral"/>
> <codebase version="1.1.8.1" href="FILE://C:/......dll"/>
> </dependentAssembly>
> </assemblyBinding>
> </configuration>
>
> Any advice or tips would be greatly appreciated.
> Thanks in Advance.
>
Author
7 Aug 2006 6:28 PM
Amruta
Hey,
Thanks for the reply. I have tried using Assembly. Load Method. However
I was thinking more on the lines of making changes in the app.config
file to load the desired version of the assembly. Any idea on how I can
do that?
Thanks,
Amruta
Kumar Reddi wrote:
Show quote
> CLR first searches the GAC when trying to load an assembly.. I am not really
> sure you can load a strong named assembly with the same version from a
> private folder if its allready installed in GAC.
>
> But I heard some folks were able to achieve this with "LoadWithPartialName"
> method in 1.1. You might wanna give a try
>
> "Amruta" <amruta.chit***@gmail.com> wrote in message
> news:1154464664.412270.231120@75g2000cwc.googlegroups.com...
> > Hi,
> > I have an Assembly version 1.1.8.1 in the GAC.My problem is that I want
> > to use an assembly with the same version outside GAC.
> > I have tried using <codebase> element by specifying the path to the
> > required Assembly,but the CLR is still loading the Assembly from the
> > GAC.
> > <configuration>
> > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> > <dependentAssembly>
> > <assemblyIdentity name="AssemblyTest"
> > publickeyToken="ebf3388bf6e61e92" culture="neutral"/>
> > <codebase version="1.1.8.1" href="FILE://C:/......dll"/>
> > </dependentAssembly>
> > </assemblyBinding>
> > </configuration>
> >
> > Any advice or tips would be greatly appreciated.
> > Thanks in Advance.
> >
Author
8 Aug 2006 12:08 AM
Kumar Reddi
As I said before.. no matter what kind of configuration you have in your
configuration files, CLR will load the GAC version of the strong named
assembly, if the private and GAC versions have the same version number. The
best way to avoid this problem is to use different version number each time
the assembly is changed

Show quote
"Amruta" <amruta.chit***@gmail.com> wrote in message
news:1154975302.433772.114030@i3g2000cwc.googlegroups.com...
> Hey,
> Thanks for the reply. I have tried using Assembly. Load Method. However
> I was thinking more on the lines of making changes in the app.config
> file to load the desired version of the assembly. Any idea on how I can
> do that?
> Thanks,
> Amruta
> Kumar Reddi wrote:
>> CLR first searches the GAC when trying to load an assembly.. I am not
>> really
>> sure you can load a strong named assembly with the same version from a
>> private folder if its allready installed in GAC.
>>
>> But I heard some folks were able to achieve this with
>> "LoadWithPartialName"
>> method in 1.1. You might wanna give a try
>>
>> "Amruta" <amruta.chit***@gmail.com> wrote in message
>> news:1154464664.412270.231120@75g2000cwc.googlegroups.com...
>> > Hi,
>> > I have an Assembly version 1.1.8.1 in the GAC.My problem is that I want
>> > to use an assembly with the same version outside GAC.
>> > I have tried using <codebase> element by specifying the path to the
>> > required Assembly,but the CLR is still loading the Assembly from the
>> > GAC.
>> > <configuration>
>> > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>> > <dependentAssembly>
>> > <assemblyIdentity name="AssemblyTest"
>> > publickeyToken="ebf3388bf6e61e92" culture="neutral"/>
>> > <codebase version="1.1.8.1" href="FILE://C:/......dll"/>
>> > </dependentAssembly>
>> > </assemblyBinding>
>> > </configuration>
>> >
>> > Any advice or tips would be greatly appreciated.
>> > Thanks in Advance.
>> >
>
Author
22 Aug 2006 1:49 AM
kumarreddi
Hi Amrutha,
I am not sure if you are still having the issue, but I read somewhere
that, if you use LoadFile methomd, then CLR loads the assembly from the
specified path with applying any policies or searching in GAC.

Kumar Reddi wrote:
Show quote
> As I said before.. no matter what kind of configuration you have in your
> configuration files, CLR will load the GAC version of the strong named
> assembly, if the private and GAC versions have the same version number. The
> best way to avoid this problem is to use different version number each time
> the assembly is changed
>
> "Amruta" <amruta.chit***@gmail.com> wrote in message
> news:1154975302.433772.114030@i3g2000cwc.googlegroups.com...
> > Hey,
> > Thanks for the reply. I have tried using Assembly. Load Method. However
> > I was thinking more on the lines of making changes in the app.config
> > file to load the desired version of the assembly. Any idea on how I can
> > do that?
> > Thanks,
> > Amruta
> > Kumar Reddi wrote:
> >> CLR first searches the GAC when trying to load an assembly.. I am not
> >> really
> >> sure you can load a strong named assembly with the same version from a
> >> private folder if its allready installed in GAC.
> >>
> >> But I heard some folks were able to achieve this with
> >> "LoadWithPartialName"
> >> method in 1.1. You might wanna give a try
> >>
> >> "Amruta" <amruta.chit***@gmail.com> wrote in message
> >> news:1154464664.412270.231120@75g2000cwc.googlegroups.com...
> >> > Hi,
> >> > I have an Assembly version 1.1.8.1 in the GAC.My problem is that I want
> >> > to use an assembly with the same version outside GAC.
> >> > I have tried using <codebase> element by specifying the path to the
> >> > required Assembly,but the CLR is still loading the Assembly from the
> >> > GAC.
> >> > <configuration>
> >> > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> >> > <dependentAssembly>
> >> > <assemblyIdentity name="AssemblyTest"
> >> > publickeyToken="ebf3388bf6e61e92" culture="neutral"/>
> >> > <codebase version="1.1.8.1" href="FILE://C:/......dll"/>
> >> > </dependentAssembly>
> >> > </assemblyBinding>
> >> > </configuration>
> >> >
> >> > Any advice or tips would be greatly appreciated.
> >> > Thanks in Advance.
> >> >
> >

AddThis Social Bookmark Button