Project Dependency in Visual Studio

I currently have a solution in Visual Studio 2010 that I need to create a project dependency for:

In Project A, I am building my custom user control library.
In Project B, I have a website project that uses my custom controls.

I want the compiled DLL from Project A to be included in the bin for Project B.  Currently, I do this manually by compiling Project A, then copying the dll into Project B.  But I wonder if the solution can be setup where this is automatic?

Any ideas will be greatly appreciated.
Who is Participating?
HooKooDooKuConnect With a Mentor Commented:
All you should need to do is have Project B reference the DLL's lib file for Project A and then use Project Dependencies to let the system know that Project B is dependent on Project A so that the build will make sure it builds Project A before it attempts to build Project B.

As for copying the DLL, you can add a command line copy in the Configuration Properties/Build Events/Post-Build Event.  Just insert the command "copy $(TargetPath) YourPathToProjectB"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.