I am trying to downgrade a NServiceBus dependency so instead of using 4.0.0.0 to use 2.5.0.0
I am trying with the following ways, none of which seem to work.
The answers above are good answers but they are missing important part. And if you read comments, some devs no longer believe this is working. In fact, this is working and working both ways, up version or down
Important: culture
In my experiment, it started to work only when I set culture to neutral. (examples above have 'en-us')
In my setup I have WinApp that references Lib1 and Lib3. Lib1 references Lib2 and Lib3. Lib2 references Lib3. And when I push the button, a call propagated all the way from WinApp to Lib3 (both, direct and through chain of libs), and text return displayed on screen. Lib3 is strong named.
Run 1 - no culture set [assembly: AssemblyCulture("")], no binding redirect set - WORKS!
Run 2 - Lower version in Lib3, set binding redirect to 'en-us' - FAIL!
Run 3 - Lower version in Lib3, set binding redirect to 'neutral' - WORKS! Works up-version and down-version.
On other runs - playing with setting [assembly: AssemblyCulture("en-us")] - all attempts failed when AssemblyCulture was not empty. In fact, when set this attribute in WinApp, it wouldn't even compile
Error CS7059: Executables cannot be satellite assemblies; culture should always be empty
So, here we go. Since I don't understand all intricacies of role of the AssemblyCulture I only claim that my experiment only proves that under specific conditions version redirect works fine.