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 / CLR / January 2006

Tip: Looking for answers? Try searching our database.

Version 1.1 Assemblies Loaded by Version 2.0 Application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boris72 - 09 Jan 2006 16:32 GMT
I have been reading through the documentation on side by side execution and
most articles cover how to target a version of the framework for your
application as a whole.

I have a .Net app that is built against version 2.0 of the framework. This
app is dependent on other .Net assemblies that are build against version 1.1
of the framework. When I run my application it is obviously going to be
loaded under version 2.0 of the framework, and by default the 1.1 assemblies
that are referenced will also be loaded under version 2.0 due to Assembly
Unification.

My question is when running my app is there a way in which I can get the 1.1
assemblies I reference to run under version 1.1 of the framework rather than
2.0, and thus being able to ensure that my dependencies will not be affected
by any breaking changes?

I have come across the following "unification of .NET Framework assemblies
prevents the runtime from loading assemblies from different versions of the
.NET Framework unless the runtime is specifically instructed to do so" but am
unsure of how to specifically instruct the runtime to load version 1.1
framework assemblies for any particular assembly that I depend upon.
Naveen - 09 Jan 2006 22:43 GMT
If the unification causes problems in your scenario, you can override
the unification by using the version policy statements. I don't think
this is required for the base class libraries because they are backward
compatible. If you still think it is required then you can use the
configuration file to override it.

<configuration>
  <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
           <assemblyIdentity name="myAssembly"
                             publicKeyToken="32ab4ba45e0a69a1"
                             culture="neutral" />
           <bindingRedirect oldVersion="2.0.0.0"
                            newVersion="1.0.0.0"/>
        </dependentAssembly>
     </assemblyBinding>
  </runtime>
</configuration>

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.