Why is the SqlCmd MSBuild task throwing an error when run with the TFS build command?

I asked about this on the MSBuild extension site , but I figured I would try to get some more eyes from it, in case someone else had a similar experience:

I have a fairly simple task that needs to execute a series of sql script files in a folder. (The task is located in the OperationalDB.msbuild file). The task looks like this:

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

      

It doesn't work when run as part of a TFS 2008 Build. The log error says:

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

Worse (from a debugging point of view) if I log into my build server with the same account as the command build service and run OperationalDB.msbuild via MSBuild from the command line, it works fine. No errors, everything SQL does.

My understanding of the task is that it terminates the SQLCmd console application. So I tried to run this on the build server. He also worked. The variable in the mix seems to be TFS Team Build. But that doesn't give me a clue as to how to investigate it - just the error mentioned above.

Any ideas?

+2


source to share





All Articles