App.config Examples
Also see: Generics and .NET
Below are three examples of useful application configuration files.
- Forces the v1.0 CLR to be run. If the v1.0 CLR is not installed, the app will fail to run.
<?xml version =”1.0″?>
<configuration>
<startup>
<requiredRuntime version=”v1.0.3705″/>
<supportedRuntime version=”v1.0.3705″/>
</startup>
</configuration> - Redirects “assemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=25283151a234958d“ to version 2.0.0.0 of that assembly. This is only useful for strongly-named assemblies, since versions don’t matter for those that are simply-named.
<?xml version =”1.0″?>
<configuration>
<runtime><assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”assemblyName” culture=”" publicKeyToken=”25283151a234958d”/>
<bindingRedirect oldVersion=”1.0.0.0″ newVersion=”2.0.0.0″/>
