Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2007

Tip: Looking for answers? Try searching our database.

Specify which assembly to load

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sanjin - 05 Sep 2007 22:10 GMT
I have assembly A.dll installed in the global assembly cache. I have also
the source code for assembly A.dll and assembly is included in the one of my
project.

I can not debug my application and step into functions and classes in the
assembly A. I can step into only when I remove assembly A.dll from the
global assembly cache.

I tried to use codeBase configuration element in the app.config but seems
that runtime always load one from cache.

Here is my codeBase element:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

 <runtime>

   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

     <dependentAssembly>

       <assemblyIdentity name="A.dll" version="2.0.0.0"

publicKeyToken="rzu13872c919c214" culture="neutral"/>

       <codeBase version="2.0.0.0" href="file:///D:/MyProject
/bin/Debug/A.dll"/>

     </dependentAssembly>

   </assemblyBinding>

 </runtime>

</configuration>

Thanks in advance

Sanjin
Michael Nemtsev, MVP - 07 Sep 2007 05:54 GMT
Hello Sanjin,

I recommend to read this article to understand how the CLR locates assemblies
http://msdn2.microsoft.com/en-us/library/yx7xezcf(vs.71).aspx

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

S> I have assembly A.dll installed in the global assembly cache. I have
S> also the source code for assembly A.dll and assembly is included in
S> the one of my project.
S>
S> I can not debug my application and step into functions and classes in
S> the assembly A. I can step into only when I remove assembly A.dll
S> from the global assembly cache.
S>
S> I tried to use codeBase configuration element in the app.config but
S> seems that runtime always load one from cache.
S>
S> Here is my codeBase element:
S>
S> <?xml version="1.0" encoding="utf-8" ?>
S>
S> <configuration>
S>
S> <runtime>
S>
S> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
S>
S> <dependentAssembly>
S>
S> <assemblyIdentity name="A.dll" version="2.0.0.0"
S>
S> publicKeyToken="rzu13872c919c214" culture="neutral"/>
S>
S> <codeBase version="2.0.0.0" href="file:///D:/MyProject
S> /bin/Debug/A.dll"/>
S>
S> </dependentAssembly>
S>
S> </assemblyBinding>
S>
S> </runtime>
S>
S> </configuration>
S>
S> Thanks in advance
S>
S> Sanjin
S>
Michael Nemtsev, MVP - 07 Sep 2007 06:00 GMT
Hello Sanjin,

And I strongly recommend to read this one http://damon.agilefactor.com/2005/11/fun-with-assembly-probing.html

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

S> I have assembly A.dll installed in the global assembly cache. I have
S> also the source code for assembly A.dll and assembly is included in
S> the one of my project.
S>
S> I can not debug my application and step into functions and classes in
S> the assembly A. I can step into only when I remove assembly A.dll
S> from the global assembly cache.
S>
S> I tried to use codeBase configuration element in the app.config but
S> seems that runtime always load one from cache.
S>
S> Here is my codeBase element:
S>
S> <?xml version="1.0" encoding="utf-8" ?>
S>
S> <configuration>
S>
S> <runtime>
S>
S> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
S>
S> <dependentAssembly>
S>
S> <assemblyIdentity name="A.dll" version="2.0.0.0"
S>
S> publicKeyToken="rzu13872c919c214" culture="neutral"/>
S>
S> <codeBase version="2.0.0.0" href="file:///D:/MyProject
S> /bin/Debug/A.dll"/>
S>
S> </dependentAssembly>
S>
S> </assemblyBinding>
S>
S> </runtime>
S>
S> </configuration>
S>
S> Thanks in advance
S>
S> Sanjin
S>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.