Hi all,
Not too long ago we switched from an extremely large single-solution project to a multiple solution project whose build system is based on the recommendation in "Appendix B, Building Large Source Trees" of "Using MSBuild and Team Foundation Build". The Appendix containing a full description of this build process is available online at
http://msbuildbook.com/Appendices.pdf. Appendix B starts at numbered page 579 (page 11 in the PDF).
Here's an example of what that might look like and the problem that I run into with NCrunch:
$BASE/../MSBuild/CommonMSBuild*.Targets
$BASE/build.proj # defines the order of the areas
$BASE/build.root # used to identify the root of the tree
$BASE/Area1/Solution1.sln
$BASE/Area1/dirs.proj # references to the solution or set of projects to build
$BASE/Area1/dirs.props # the properties used when doing the build
$BASE/Area1/Subdir/Solution1Project1.csproj
$BASE/Area2/Solution2.sln
$BASE/Area2/dirs.proj # references to the solution or set of projects to build
$BASE/Area2/dirs.props # the properties used when doing the build
$BASE/Area2/Subdir/Solution2Project1.csproj
...
For this example, let's assume that Area2/Solution2.sln depends on Area1/Solution1.sln. When the build occurs, Solution1 is built and its output is copied into a "libs" directory referenced by Solution2. This allows us to do a command line build, which populates the libs folder, and then open Solution2 in VisualStudio and have all its files present. Note that although my example shows a fairly shallow tree, the reality is that the tree can be much deeper. The common msbuild targets files are used by each Solution file through includes.
The problem that I have encountered in NCrunch is that, despite modifying the *.csproj files in Solution2 to conditionally reference all the content, NCrunch doesn't copy the $BASE/MSBuild/Common*.Targets into the NCrunch build hierarchy. It appears that this is the case regardless of the "Additional Files to Include" setting because the hierarchy of files references appears to be retained which would place the common target files outside of the NCRunch directory.
To put that into a picture, here's what NCrunch *attempts* to create when loading Solution2:
AppData/Local/NCrunch/PID1/1/_ncrunchreferences
AppData/Local/NCrunch/PID1/1/Solution2Project1/*
AppData/Local/MSBuild/CommonMSBuild*.Targets
However, even with "Additional Files to Include" set to include MSBuild/CommonMSBuild*.Targets, NCrunch prevents them from being copied to the filesystem (and rightfully so) because those files would end up outside of the AppData/Local/NCrunch hierarchy... if I'm understanding everything correctly.
Given the above, do you have any ideas on how we can get NCrunch working with the build structure given above?
Thanks!
--Kaleb