From: Mr. Magic on
I have a couple of dlls that I am working on. I use them in assorted
projects. Problem is, when I change the dll, the next time I compile the
programs that use them they don't have the most current version.

How can I make it so that it's always using the most recent version of the
dll?

I'd rather not include the project for the DLL in the solution and make the
software dependent on it but I will if I have to.

Currently I'm doing References -> Add Reference and going to find the dll
and adding it.

TIA - Jeff.


From: Chris Dunaway on
On Apr 19, 10:59 am, "Mr. Magic" <Muf...(a)NoWhere.Com> wrote:
> I have a couple of dlls that I am working on. I use them in assorted
> projects. Problem is, when I change the dll, the next time I compile the
> programs that use them they don't have the most current version.
>
> How can I make it so that it's always using the most recent version of the
> dll?
>
> I'd rather not include the project for the DLL in the solution and make the
> software dependent on it but I will if I have to.
>
> Currently I'm doing References -> Add Reference and going to find the dll
> and adding it.
>
> TIA - Jeff.

From the docs: (http://msdn.microsoft.com/en-us/library/ez524kew(VS.
80).aspx)

"The advantage of a project-to-project reference is that it creates a
dependency between the projects in the build system, so the dependent
project will be built if it has changed since the last time the
referencing project was built. A file reference does not create a
build dependency, so it is possible to build the referencing project
without building the dependent project, and the reference can become
obsolete (that is, the project can reference a previously built
version of the project). This can result in several versions of a
single DLL being required in the bin directory, which is not possible.
When this conflict occurs, you will see a message such as Warning: the
dependency 'file' in project 'project' cannot be copied to the run
directory because it would overwrite the reference 'file.'.

You should avoid adding file references to outputs of another project
within the same solution, because doing so may cause compilation
errors. Instead, use the Projects tab of the Add Reference dialog box
to create project-to-project references within the same solution. This
makes team development easier by allowing for better management of the
class libraries you create in your projects. For more information, see
Troubleshooting Broken References and How to: Create and Remove
Project Dependencies."

Chris
From: Jeff Johnson on
"Mr. Magic" <Mufasa(a)NoWhere.Com> wrote in message
news:%23oTxKl93KHA.4964(a)TK2MSFTNGP05.phx.gbl...

>I have a couple of dlls that I am working on. I use them in assorted
>projects. Problem is, when I change the dll, the next time I compile the
>programs that use them they don't have the most current version.
>
> How can I make it so that it's always using the most recent version of the
> dll?
>
> I'd rather not include the project for the DLL in the solution and make
> the software dependent on it but I will if I have to.

If the DLL (project) you're dependent on is likely to change on a regular
basis, you really really really want to make a project reference and avoid
the headache you're currently experiencing. I love project references and go
out of my way not to have FILE references.