We have been using the solution task with referenced
assemblies for some time to build patches. We first
copy the dependencies to the output path, then we
build. The nant file looks something like this:
<copy todir="${build.dir}\${config}" flatten="true">
<fileset basedir="${mco.dir}">
<include name="**\pdictlextenders.dll" />
<include name="**\pdictllocalizer.dll" />
<include name="**\pdilibuserdefdata.dll" />
<include name="**\pdictldataselector.dll" />
<include name="**\pdilibaddress.dll" />
<include name="**\pdictloutputsettings.dll" />
<include name="**\pdilibutility.dll" />
<include name="**\pdictlset2.dll" />
</fileset>
</copy>
<solution configuration="${config}"
outputdir="${build.dir}\${config}">
<projects
basedir="\\StJohn\Rel\Brookstone\BrookstoneRelease\V
03.10\00\RU031000007\Source\BuildProj">
<include name="lib\pdictlset1\pdictlset1.csproj" />
</projects>
<referenceprojects
basedir="\\StJohn\Rel\Brookstone\BrookstoneRelease\V
03.10\00\RU031000007\Source\RefProj">
<include
name="lib\pdictlextenders\pdictlextenders.csproj" />
<include
name="lib\pdictllocalizer\pdictllocalizer.csproj" />
<include
name="lib\pdilibuserdefdata\pdilibuserdefdata.csproj" />
<include
name="lib\pdictldataselector\pdictldataselector.csproj" /
>
<include
name="lib\pdilibaddress\pdilibaddress.csproj" />
<include
name="lib\pdictloutputsettings\pdictloutputsettings.cspro
j" />
<include
name="lib\pdilibutility\pdilibutility.csproj" />
<include name="lib\pdictlset2\pdictlset2.csproj" />
</referenceprojects>
<assemblyfolders>
<include name="${build.dir}\${config}" />
<include name="${mco.dir}\${config}\**" />
</assemblyfolders>
</solution>
<delete>
<fileset basedir="${build.dir}\${config}">
<include name="**\pdictlextenders.dll" />
<include name="**\pdictllocalizer.dll" />
<include name="**\pdilibuserdefdata.dll" />
<include name="**\pdictldataselector.dll" />
<include name="**\pdilibaddress.dll" />
<include name="**\pdictloutputsettings.dll" />
<include name="**\pdilibutility.dll" />
<include name="**\pdictlset2.dll" />
</fileset>
</delete>
In this case we want to build pdictlset1 which may
depend on the assemblies referenced by the
referenceProjects. We have not built the reference
projects in this source tree, but we have copied them to
the output path. This has worked for a long time, but
rc2 (I think) broke it because it started using the \obj
directories for the referenced assemblies and not the
final output path specified in the project file.
The attached patch will use the file in the final output
path if it cannot find the file in the \obj directory.
Patch to ProjectReferenceBase to find file in OutputPath