Hi everyone,
I have a (probably dumb) question in the scope of .Net's version
rebinding capabilities:
My application (lets call it myapp.exe v1.0.0.0) was compiled
referencing an assembly (anassembly.dll) with version 1.0.0.0.
As the assembly was revised later, the current version (which is
deployed) is now 2.0.0.0 (functionally, version 1 and 2 are fully
compatible).
In order to make use of version 2.0.0.0 I declared a rebinding in
myapp.exe.config, like
<dependentAssembly>
<assemblyIdentity name="myapp"
publicKeyToken="23422eg23e322222" />
<bindingRedirect oldVersion="1.0.0.0-65535.65535.65535.65535"
newVersion="2.0.0.0" />
</dependentAssembly>
So far so good.
For some reasons that I do not want explain in detail, I decided to
change the key, which was used to sign the assembly. Accordingly, I
recompile anassembly.dll and increment the version number to 3.0.0.0.
Let's assume, I do not have the chance to re-compile myapp.
The task is now to deploy anassembly (version 3.0.0.0, publicKey:
"fffffeeeedddddcc") and being compatible with myapp.exe v1.0.0.0.
Adapting the newVersion tag in myapp.exe.config is not sufficient
since the public keys differ between the the version of anassembly,
which was initially linked (v1.0.0.0, publicKey="23422eg23e322222")
and the one which is deployed (version 3.0.0.0, publicKey:
"fffffeeeedddddcc") .
My question:
Is there any way to accomplish a rebinding of assemblies in the case,
that the key has changed or is this explicitly prevented by .Net due
to security reasons?
Any help is appreciated...
Tobias