tags:

views:

66

answers:

2

I'm developing a desktop application. For that I'm creating class libraries. At the development time I have to rebuild the class library multiple times for functional testing and update reference to DLL. But once I add a reference to a DLL, then add some code to a class file and rebuild it, and add a reference to the newly built DLL, it's not updating the reference. It refers to the old DLL only.

+6  A: 

That's the expected behavior for what you are doing. By manually adding the reference DLL, you are simply copying the compiled file at that time, so further compiles will not update the copied DLL.

What you want is to add a project reference to the working project.

How to: Add a Reference to a Visual Studio Project in a Web Site

Rafael Belliard
A: 

If you are building on the same machine, when you add a reference to a DLL it will by default remember where that DLL was and pick up newer versions as they appear and the project is built.

Sometimes it can get confused, so a Rebuild All can solve the problem, or dropping and readding the reference.

ck