home *** CD-ROM | disk | FTP | other *** search
-
- <!-- #include virtual="/quickstart/howto/include/header.inc" -->
-
- <%
- runsample = Server.MapPath("/quickstart/howto/samples/assemblies/version")
- icon = "/quickstart/images/genicon.gif"
- caption = "math.exe"
- %>
-
- <h4>How Do I...change which version of an assembly I bind to?</h4>
-
- <div class="indent" style="WIDTH: 660px">
- This sample demonstrates how to use an application configuration file to bind to a specific version of a dependent assembly.
- </div>
-
- <h4>Example</h4>
-
- <p>
- <div class="indent">
- <a target="_blank" href="<%=runsample%>">
- <img style="border-color:black" border=1 src="<%=icon%>"><br>
- </a>
- <div class="caption"><%=caption%></div><br>
- </div>
-
- <h4>Assembly Search Paths</h4>
- <div class="indent" style="WIDTH: 660px">
- <P>By default, the version of a dependent assembly that will be loaded at runtime is the version
- specified in your assembly manifest (subject to automatic QFE policy). If
- you'd like to run with a different version, you specify "Binding
- Policy" in your application configuration file. For an executable, the
- configuration file resides in the same directory as the exe and has the
- same name (minus ".exe") with a ".cfg" extension. For this sample the executable is
- called math.exe and the configuration file is called math.cfg. The relavent poriton
- of the cfg file looks like this: </P>
- <P><BindingPolicy></P>
- <P> <BindingRedir Name="Calcr"
- Orginator="32ab4ba45e0a69a1"</P>
- <P>
- Version="5.0.0.0" VersionNew="6.0.0.0"</P>
- <P>
- UseLatestBuildRevision="yes"
- </P>
- <P></BindingPolicy></P>
- <P>
-
- The "BindingRedir" attribute of the "BindingPolicy" tag specifies that all references to
- version 5 of Calcr within this application should use version
- 6 instead.</P>
-
- </div><!-- #include virtual="/quickstart/howto/include/footer.inc" -->