home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / QuickStart / howto / doc / version.aspx < prev    next >
Encoding:
Text File  |  2000-06-09  |  2.4 KB  |  51 lines

  1.  
  2. <!-- #include virtual="/quickstart/howto/include/header.inc" -->
  3.  
  4. <%
  5.     runsample = Server.MapPath("/quickstart/howto/samples/assemblies/version")
  6.     icon = "/quickstart/images/genicon.gif"
  7.     caption = "math.exe"
  8. %>
  9.  
  10. <h4>How Do I...change which version of an assembly I bind to?</h4>
  11.  
  12. <div class="indent" style="WIDTH: 660px">
  13. This sample demonstrates how to use an application configuration file to bind to a specific version of a dependent assembly.
  14. </div>
  15.  
  16. <h4>Example</h4>
  17.  
  18. <p>
  19. <div class="indent">
  20. <a target="_blank" href="<%=runsample%>">
  21. <img style="border-color:black" border=1 src="<%=icon%>"><br>
  22. </a>
  23. <div class="caption"><%=caption%></div><br>
  24. </div>
  25.  
  26. <h4>Assembly Search Paths</h4>
  27. <div class="indent" style="WIDTH: 660px">
  28. <P>By default, the version of a dependent assembly that will be loaded at runtime is the version 
  29. specified in your assembly manifest (subject to automatic QFE policy).  If 
  30. you'd like to run with a different version, you specify  "Binding 
  31. Policy" in your application configuration file.  For an executable, the 
  32. configuration file resides in the same directory as the exe and has the 
  33. same name (minus ".exe") with a ".cfg" extension.  For this sample the executable is 
  34. called math.exe and the configuration file is called math.cfg.  The relavent poriton 
  35. of the cfg file looks like this: </P>
  36. <P><BindingPolicy></P>
  37. <P>    <BindingRedir Name="Calcr" 
  38. Orginator="32ab4ba45e0a69a1"</P>
  39. <P>                          
  40. Version="5.0.0.0" VersionNew="6.0.0.0"</P>
  41. <P>                          
  42. UseLatestBuildRevision="yes"                                       
  43. </P>
  44. <P></BindingPolicy></P>
  45. <P>           
  46.            
  47.  The "BindingRedir" attribute of the "BindingPolicy" tag specifies that all references to 
  48. version 5 of Calcr within this application should use version 
  49. 6 instead.</P>
  50.                        
  51. </div><!-- #include virtual="/quickstart/howto/include/footer.inc" -->