Dependent Assemblies not copy over multiple levels

It appears that following my conversion to .NET 2 some of my dependent assemblies aren't getting copied accross more than one level.

i.e.SmartCheckRemoteBusinessServices references SmartCheckDataAccessObject that references both SmartCheckBusinessObjectPersistenceMappingAU and SmartCheckBusinessObjectPersistenceMappingUK.

SmartCheckBusinessObjectPersistenceMappingAU.dll and SmartCheckBusinessObjectPersistenceMappingUK.dll are not being copied to ..SmartCheck\SmartCheckRemoteBusinessServices\bin\Debug.

These are getting built into ..\SmartCheckDataAccessObject\bin\Debug but not copied accross to the remote business services binary area. The SmartCheckBusinessObjectPersistenceMappingAU and SmartCheckBusinessObjectPersistenceMappingUK projects do not have any managed code, they are just performing persistence mapping between properties and the Db.

If I create a dummy class in one of these projects and reference it in the SmartCheckDataAccessObject project then the assembly is copied all the way down. It looks like VS2005 is trying to do some new sort of compiling where it checks if assembly functionality is implemented before it copies the dependency accross. Is there a way that I can turn this off so I dont have to have this dummy class implementation



Answer this question

Dependent Assemblies not copy over multiple levels

  • MustangCobra

    In all the cases I've seen if you reference an assembly A that itself has dependencies on B and C then when you add the reference to A it'll add the references to B and C. Furthermore it'll complain at compile time if it finds a dependency that is not referenced. This will only occur though if at least one type from A relies on a type from B or C. Try adding the reference to the subassemblies to the project that references the topmost assembly.

    Michael Taylor - 12/13/06


  • VincentITA

    Yeah. It appears to be a minor compiling change between 2003 and 2005 and only because both my mapping projects are completely XML so have no managed code. My dummy class reference has solved the problem but it looks nasty and unnecessary. Thaniks for your input anyway.
  • Leland Gary

    I'm not aware of any changes that would cause the problem you're seeing. However this would be related to VS and not the framework. The framework doesn't copy assembly files at all. It is VS that copies assemblies to the appropriate directory before running.

    Michael Taylor - 12/15/06


  • robinjam

    This was not occuring in .NET 1.1, only in v2.0. What has changed in the framework to cause this
  • Dependent Assemblies not copy over multiple levels