views:

43

answers:

1

I have 2 compiled assemblies. Assembly A references assembly B.

I would like to change some code in assembly B. I would like to create a class library that impersonates assembly B in the eyes of assembly A. I want assembly A to continue working with my new types and namesspaces as if nothing ever happened.

Can I just create the new assembly with the same name and version number? Will assembly A assume that the new assembly is just like the old assembly B?

+1  A: 

Assuming that the original assembly is not signed and the old assembly's interface is a subset of the new one's (could be the same), you should be ok. It would basically be the same as changing all the internals of B and possibly adding new methods without updating the version number.

tvanfosson
How do I see, maybe with reflector, if an assembly is signed?
Paul Knopf
You can use the Strong Name tool, http://msdn.microsoft.com/en-us/library/k5b5tt23.aspx, to view the public key information if there is any.
tvanfosson