Deployment question regarding base class

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I've got a base class in an assembly, then I have a lot of other
assemblies that inherit from it.

Now I modified some of the private methods in the base class, and I want
to deploy the new base class.

Do I have to recompile all of the child class assemblies that inherit
from it, or will they work "as is" with the new base class (the public
aspects of the base class are the same)?

I know about GAC versioning, so I plan on keeping the same version
number in the base class, or I can use a binding redirect, or publisher
policy, etc. This question isn't about versioing, I'm just wondoring if
the child projects need to be recompiled.

Eric
 
No, the derived class assemblies do not require recompilation as long as nothing has structurally changed that may affect them (such as changing the signature of a protected method).

I, of course, assume you are going to run this in a test environment before you release it ;-)

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I've got a base class in an assembly, then I have a lot of other
assemblies that inherit from it.

Now I modified some of the private methods in the base class, and I want
to deploy the new base class.

Do I have to recompile all of the child class assemblies that inherit
from it, or will they work "as is" with the new base class (the public
aspects of the base class are the same)?

I know about GAC versioning, so I plan on keeping the same version
number in the base class, or I can use a binding redirect, or publisher
policy, etc. This question isn't about versioing, I'm just wondoring if
the child projects need to be recompiled.

Eric
 
Richard said:
No, the derived class assemblies do not require recompilation as long as nothing has structurally changed that may affect them (such as changing the signature of a protected method).

I, of course, assume you are going to run this in a test environment before you release it ;-)

yes, I've done some testing already and it seems to work. I had an
uneasy feeling about going forward on this, but I will turn it in to our
QA section for final testing.

I'm used to static linking at compile time, but I guess .NET doesn't
have the ability to compile base class code into a derived class if they
are compiled with separate projects. It looks like .NET always uses
dynamic linking?

The metadata we see in Intellisense almost makes it look like static
linking, especially since compile-time references are needed.

Eric
 
Back
Top