I'm always compile my project, and copy the dll's from the dependency projects to the UI bin folder. after a few days with 'copy & paste' operations each time that I recompile my project, I concluded that I need a tool that will do it to me automatically. after a few searches a founded that this tool is nAnt.
I search for information how to start using it, but I did not found much. so, my question is:
EDIT: I can't just add a reference to the dependencies projects because it will lead to a circular dependency.
NAnt is a build tool that builds .NET projects and solutions (based on the original Ant for Java). It is also an XML-based "scripting" language where you order "tasks" to do the build work, including the types of things you are talking about--and MUCH, MUCH more!
We use NAnt as our build scripting tool (triggered on every source-control checkin by Cruise Control.NET, a.k.a. CCNET, our Continuous Integration tool) to do our automated builds. It includes things like:
Another solution is MSBuild, which is actually what Visual Studio uses. It is very similar.
Do note: You CANNOT build Setup & Deployment projects with NAnt's solution task (you also cannot do this with MSBuild). To get around this, we have started running devenv.com (Visual Studio without a UI) with command-line arguments--using NAnt's "exec" task instead of the built-in "solution" task--to build the whole solution, including Setup & Deployment Packages. We have also uses WiX and MSBuild in the past...
Finally, for the specific issue you outline, you should really just consider one of these options:
You really can't go wrong investing time in NAnt, and eventually CCNET as your project complexity increases. You can have CCNet watch your source control for checkins or run nightly, AND you can set up dependent projects, so that, for example, if your dependency project builds, it can kick off a build of your web site and/or run Unit Tests to see if anything broke.