Codebase Probing

Assembly probing can be used only to locate assemblies in subdirectories relative to the location of the application. The .NET Framework provides another alternative to the GAC that can be used to locate assemblies anywhere on the local system as well as on remote Internet servers; this alternative is available through the codebase element of an application configuration file. The following example demonstrates how to look for version 1.0.0.0 of the StringPrinter assembly in the C:\temp directory of the local system:

<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="StringPrinter" publicKeyToken="539a6301c167d487" culture="" /> <codeBase version="1.0.0.0" ...

Get C# for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.