VS2005 Reference problem updating bin directory

C

Coder

After updating to VS2005 we noticed that references are not always
updating our bin directory in the case of indirect references.

For example:

PROJECT 1
PROJECT 2 (ref project1)
PROJECT 3 (ref project2)
PROJECT4 (ref project 3)

When compiling project4, I should see the DLLs of all my projects in
Project4\Bin, but I don't. This is a simplified example, our solution
is much larger and I don't know why some DLLs are copied and some are
not (regardless if they referenced directly or indirectly).

Under VS2003 this worked great... so I don't understand what changed.

Thank you in advance for any input on this.
 
C

Coder

It appears that a DLL is going to be copied, not only if there is a
reference to it, a class within the referenced DLL must be used. We
tried running projects just with references but no code, and then
nothing was copied. As soon as we started to use the new keyword, the
copy worked.

To conclude: reference alone will not guarantee a copy - if you don't
use it you loose it.

We were using dynamic creation which is why the DLLs did not get
copied. We are now using post build events to solve the problem.

Anyways, I hope I saved someone hours of work... :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top