views:

314

answers:

0

I asked this over at the MSBuild Extension Pack site, but I figured I would try to get some more eyes on it, in case someone else has had a similar experience:

I have a pretty straightforward task that should execute a series of sql script files in a folder. (The task is in a file called OperationalDB.msbuild). The task looks like this:

<MSBuild.ExtensionPack.SqlServer.SqlCmd
    TaskAction="Execute"
    Server="$(SqlServerName)"
    Database="$(SqlCatalogName)"
    InputFiles="@(OperationalStaticDataFiles)"
/>

It fails when running as part of a TFS 2008 team build. The log error says:

C:\b\56\S\Main\Builds\OperationalDB.msbuild : warning : Exit Code 1. Failure: Sqlcmd: Error: Internal error at ReadTextLine (Reason: Unspecified error).

Worse, (from a debugging perspective), if I log in to my build server with the same account that the team build service is running, and run OperationalDB.msbuild through MSBuild from a command line, it works beautifully. No errors, all the SQL executes.

My understanding of the task is that it wraps the SQLCmd console app. So I tried running that on the build server as well. It also worked. The variable in the mix seems to be TFS Team Build. But it's not giving me insight of how to investigate it -- just the error listed above.

Any ideas?