|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problems in loading a Non-GAC version of AssemblyHi,
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. 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 quoteHide 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. > 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 quoteHide 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. > > 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 quoteHide 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. >> > > 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 quoteHide 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. > >> > > >
Other interesting topics
CultureInfo.NumericFormat and System.Convert
Unhandled Exception in Windows Service How to change DACL of a Windows Service in C#? Upgrading from 1.1 to 2.0 Preventing ThreadAbortException. .NET 2.0 Modifying Security.config file GetMethodName using Reflections Namespace create the array using reflection css issue |
|||||||||||||||||||||||