Failed to detect target in MSBuild project

Hi Everybody,

first of all: I linke TeamCity very much. Great CI Server.

But I have some problems with the TeamCity MSBuild replacement I think.

I've tried to compile a Delphi 2010 Project (MSBuild compliant) with NAnt using the MSBuild task (NAnt Contrib).
Everything works fine, if I do it without TeamCity on the console.
If I try it with TeamCity, I get the following error message:

Failed to detect default target(s) in the project file  F:\CI\TeamCity\TeamCity\buildAgent\work\892195dab42324a3\build\src.temp\TestProject\Test.dproj.  Please define targets explicitly in the build configuration options on  TeamCity Web UI. Project does not define DefaultTargets or  InitialTargets.

I've tried to explicitly set the target via the MSBuild /target switch pointing to the Rebuild target. So far no luck.

Any Suggestions? Thanks in advance.

1 comment
Comment actions Permalink


MSBuild runner have dedicated field where targets should be specified. Please try putting targets there instead of adding /target:*** commandline argument.

Check that on the build agent machine under build agent windows service running user account Delphi 2010 msbuild extensions are configured and workable.


Please sign in to leave a comment.