TeamCity error: Can't find a .dll

Topics: General Questions
Jun 24, 2010 at 2:31 AM

I am getting an error that only occurs when building on TeamCity.  For some reason it is not finding one of the dll dependencies it is building documentation for.  This works fine when building locally but on the build server I see this:

18:18:47]: "C:\TeamCity\buildAgent\work\22bee0dcaf606b79\V1\Incentive.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build;TeamCity_Generated_NUnitTests target) (1) ->
[18:18:47]: "C:\TeamCity\buildAgent\work\22bee0dcaf606b79\V1\Incentive.sln" (Clean;Build target) (2) ->
[18:18:47]: "C:\TeamCity\buildAgent\work\22bee0dcaf606b79\V1\Docs\Docs.csproj" (default target) (13:2) ->
[18:18:47]: (CoreBuildHelp target) ->
[18:18:47]: C:\Program Files\Dave Sexton\DocProject\bin\DaveSexton.DocProject.targets(40,5): error : Missing source assembly or file in output directory: C:\TeamCity\buildAgent\work\22bee0dcaf606b79\V1\VisionCritical.Incentive.Service\bin\Release\VisionCritical.Incentive.Service.dll
[18:18:47]: 967 Warning(s)
[18:18:47]: 1 Error(s)
[18:18:47]: Time Elapsed 00:00:08.84
[18:18:47]: Publishing artifacts

Not really sure why it is looking in /bin/Release for that dll since that project builds out to /bin instead.

Jun 25, 2010 at 1:30 PM


Did you modify the OutputPath property of the project in your build script?  Or are you setting the OutDir property globally?

The latter is something that Team Build does, for example.  It sets the OutDir property on the command-line to override the OutputPath property on all projects at once,
so that all output is built into the same folder for all projects.

DocProject relies on the OutDir property.  If it's not being set globally then the base project MSBuild scripts will automatically assign it to the OutputPath property as each project is built.
Just make sure that the OutputPath property on the project is correct, or that if you're setting the OutDir property that it's either set globally or that it's correct for the current project.

If all else fails, consider modifying the DaveSexton.DocProject.targets file on your build server so that it meets your needs.  You can find this file where DocProject is installed.

(Note that in a subsequent release of DocProject this file will most likely be moved to the MSBuild installation directory.)

- Dave

Jun 25, 2010 at 1:34 PM


I just want to add that I've used TeamCity to build several DocSite projects without any issues and without any special configuration required.  Therefore, I must assume that you've added some customizations
to paths in your build scripts.  Definitely check the OutputPath of the source project to make sure that it's what you expect.

- Dave