Custom Binding: Application Configuration

To allow the client application to make use of the newly built assembly, an application configuration file must exist in the same directory as the .exe. The configuration file will have the same name as the application name, including the extension. In the case of the Shared Client.exe program, the configuration file will have the name SharedClient.exe.config. The configuration file listed in Listing 5.2.4 shows the necessary entries to redirect the binding from the 1.0 version to the 1.1 version of the SharedComponent.dll.

Listing 5.2.4. SharedClient.exe.config
 1: <?xml version="1.0"?> 2: <configuration> 3: <runtime> 4: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 5: <dependentAssembly> ...

Get C# and the .NET Framework: The C++ Perspective 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.