I'm trying to implement a (conditional) binding redirect. I'd like binding redirect to use a particular version of an assembly depending if another, newer version already exists.
For clarity, the project currently references version 1.1.0.0, but if that does not exist, I want it to reference version 1.0.0.0.
This redirect currently redirects successfully to 1.0.0.0, but environments with only 1.1.0.0 do not function properly (assembly name and publicKeyToken have been changed for this post).
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyAssembly" culture="neutral" publicKeyToken="blahblahblah"/>
<bindingRedirect oldVersion="1.1.0.0" newVersion="1.0.0.0"/>
<codeBase version="1.0.0.0" href="file://C:\Windows\assembly\GAC_MSIL\MyAssembly"/>
</dependentAssembly>
</assemblyBinding>
How can I cancel/ignore this redirect in the case that it is not needed?