Copy Local Fails

I have a large solution (16 c# dll projects, 1 c# exe project) where the dll projects are project references  of the exe project.  I have set copy local true for all the projects.

The problem is on alternating rebuild-all builds one or two of the 16 dll's are not copied into the exe's bin/debug directory.  On the good build, all references are there and on the next build, some of the dll's are missing.

Any suggestions

SB


Answer this question

Copy Local Fails

  • Guruper

    I assume you should carefully check the order in which your dlls are referenced. It seems like VS doesn't find some dll's from a reference of another referenced project.
    I would just delete and re-set all references.

  • Software Arch

    Hi,

    Are all of these project references If these are project references then everything would get built anyway and so you can delete all DLLs/PDBs in the bin folder and then do a Rebuild All.

    Regards,

    Vikram



  • eddieg

    Hi,

    These are all project references.  

    After deleting all dll's and pdb's, copy local fails on a rebuild all.  If I do another rebuild all, copy local is sucessfull.

    BTW, This project was ported from VS 2003.  In VS 2003, I did not have this problem.

    thanks

  • Rodrigao

    The problem was fixed by toggling the references to copy local = false and then back to copy local = true.  This causes the following entry to be written into the csproj file for the references:

    <Private>True</Private>

    Now copy local consistantly works.

    It seems that after porting a project from vs 2003 to vs 2005, the references with copy local true do not get the private field.  The IDE displays copy local true but the behavior is inconsistant until you force the provate element in by toggling copy local.

    Steve


  • Rabarbers

    Hmm.. we have 70 dll projects and 1 exe. Yes, we have sometimes such problems like you desribed it above, but it happens very rarely. Try to close VS, delete all .pdb files and then full recompile your solution..

  • Copy Local Fails