Search code examples
c#f#build-processbuild-dependencies

Detect and Build Dependencies for C# Solutions


We have a Project with a number of different solutions files and each solution then has many projects. The problem is that there are projects that need to be built for certain solutions. Each developer has to go through the pain of opening a large solution (a solution that contains many projects). The problem is that these solutions don't always build because a certain build order has to be followed.

My question is, is there a way to identify dependencies for each project in a given directory and then build these projects. Something like find all the project files that don't have any dependencies on our other projects that we own. So build such projects first then build the ones whose dependencies are already built.

I was thinking of using F# or Fake to do this but I am not sure where to start or if it is even possible.

I would really appreciate an answer with an example or links to where I can get help.

Regards,

Nasir


Solution

  • If you want to go with something off the shelf. Resharper from JetBrains has a very nice tool for viewing project build dependencies. This will help you create a build script with the correct build order.

    http://www.jetbrains.com/resharper/webhelp/Architecture__Project_Dependencies_Exploration.html