views:

72

answers:

3

Question in the title.

I'd like to avoid recompiling since the source code I'm modifying is third party and I'd like to use the original binaries where possible, and replace only the assembly which contains the class I modified. But I'm not sure if this is a safe thing to do. In C++ for example this is definitely a bad idea.

+6  A: 

No.

The assemblies that reference your library refer to methods and types using (some form of) name, so as long as you don't change the names of public types and methods (used by other assemblies), you don't need to recompile any of the assemblies - they will work with the updated version of the library.

Tomas Petricek
A: 

No. All other assemblies will automatically work with the newly updated library.

Johnny
+1  A: 

In most cases Tomas answer is correct, but there are some cases where it is not true:

  1. When using strong naming (signing) change of a single character leads to a new signature, thous leading to a new strong name.
  2. Setting in your project references for your assembly the property Specific Version to true and changing the version number manually or automatically in AssemblyInfo.cs
Oliver