I have a CF application which needs to use bindingRedirect to load appropriate versions of dlls. The dlls are located in a folder structure underneath the application folder.
My BindingRedirect works, the CF looks for the new version of the dll, and if it's located in the app directory, everything works. What does not work is using the codebase to find the file in a specific location. We've been doing this on the desktop for years without issue, but I can't get it to work on the CF.
Here is my configuration file:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyCompany.MyLibrary" publicKeyToken="myPKT" />
<bindingRedirect
oldVersion="0.0.0.0-1.0.0.0"
newVersion="1.1.0.0" />
<codeBase
version="1.0.0.0"
href="file://\Program Files\MyApp\lib\v1.0.0\MyCompany.MyLibrary.dll" />
<codeBase
version="1.1.0.0"
href="file://\Program Files\MyApp\lib\v1.1.0\MyCompany.MyLibrary.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I've tried several versions of formatting the href. relative, with or without the leading "\", with or without "file://", nothing seems to work. And again, the redirect IS working, it correctly looks for the 1.1 version, it just can't find it.
Any ideas as to why this isn't working?