views:

10

answers:

1

If I have a visual studio solution with a multiple projects, from the projects how do I figure out which one will have all the dlls once the solution is built?

The reason is I need to copy those dll's for my custom written build app. I know in the Visual studio GUI, if I right click on the solution and go to Project Build Order, the lowest level item will be the project which will have the complete list of built dll's and referenced dll's. So is there any logic I can use to work this out through code?

A: 

You could write some code to read the solution / project files (the formats are not hard) and work out the dependency tree yourself.

However, a better approach is to change all the projects to output to a common \bin directory to start with by altering the build properties in Visual Studio. This avoids you having numerous copies of binaries in various individual project bin directories and makes life easier when it grows to a size where you need to split into multiple solutions.

A directory structure something like the following is often useful:

  \bin (Common output directory for all projects)
  \src (I usually keep the solution file in \src)
    \ProjectA
    \ProjectB
  \lib (Common libraries, e.g. nunit or log4net etc)
Paolo
Thanks for your reponse.I do have access to the solution files using a parser and that works well and I guess I can do the same for the project dependencies if I need to but I don't think I will be able to change output directory for each project due to the fact that I will have to get permission for this so would rather avoid unless I really have to, any other possible solutions?
Rubans