0

I had to create new question, because my answers are considered bad

I am referring to this already answered question.

Kiquenet asked it already in comment to the answer, but noone answered him.

Now, when we all know why it happens, can anyone tell if (and if then how) there is any solution to the issue which does not involve rebuilding projects?

In my case where assemblies are loaded dynamically and apart from that are shared between different versions of projects it is not acceptable for me to rebuild all everytime I need new version of loaded assembly.

All interfaces are implemented correctly and option like: "indefinite reference"/"version invariant" would be perfect.

Community
  • 1
  • 1
Michael Brennt
  • 731
  • 9
  • 20

1 Answers1

0

Simple solution: rebuild all assemblies.

Your requirement to avoid rebuilding projects is unreasonable. Some changes in the code do require you to rebuild projects. There's no way to avoid this, except never ever changing interfaces (and other features shared by many types).

Athari
  • 33,702
  • 16
  • 105
  • 146
  • It is not unreasonable. Let's think of a winforms "admin_app" which dynamically loads some dll's with some functions, e.g. (to make it really simple) one with text reader and one with xls reader. Both reference another shared assembly. When new version of reader is created we dont want to rebuild whole app but only the reader itself, and provide it to end user. Maybe it's something crazy, but it doesn't seem to. – Michael Brennt Sep 16 '13 at 12:17
  • Oh, and there are no interfaces that change. Only thing that changes is the implementation of methods itself. But even if nothing in code changes but the project is just rebuilt it still causes this annoying crazy issue. – Michael Brennt Sep 16 '13 at 12:22
  • Obviously, something besides implementation has changed. Interfaces aren't the only thing that can cause this issue. – Athari Sep 16 '13 at 12:44