.NET substitute dependent assemblies without recompiling?

Posted by RK on Stack Overflow See other posts from Stack Overflow or by RK
Published on 2010-04-07T19:32:16Z Indexed on 2010/04/08 12:23 UTC
Read the original article Hit count: 410

Filed under:
|
|
|

I have a question about how the .NET framework (2.0) resolves dependent assemblies.

We're currently involved in a bit of a rewrite of a large ASP.NET application and various satellite executables. There are also some nagging problems with our foundation classes that we developed a new API to solve. So far this is a normal, albeit wide-reaching, update.

Our heirarchy is:

  1. ASP.NET (aspx)
  2. business logic (DLLs)
  3. foundation classes (DLLs)

So ASP.NET doesn't throw a fit, some of the DLLs (specifically the foundation classes) have a redirection layer that contains the old namespaces/functions and forwards them to the new API. When we replaced the DLLs, ASP.NET picked them up fine (probably because it triggered a recompile).

Precompiled applications don't though, even though the same namespaces and classes are in both sets of DLLs. Even when the file is renamed, it complains about the assemblyname attribute being different (which it has to be by necessity). I know you can redirect to differnet versions of the same assembly, but is there any way to direct to a completely different assembly?

The alternatives are to recompile the applications (don't really want to because the applications themselves haven't changed) or recompile the old foundation DLL with stubs refering to the new foundation DLL (the new dummy DLL is file system clutter).

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET