1
votes

I have two Visual Studio database projects. Both build fine on my local dev environment. On the TFS build server, with a TFS build solution containing both projcets, one builds fine and the other fails with this error:

Task "SqlBuildTask"
  Creating a model to represent the project...
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets(58,5): error MSB4018: The "SqlBuildTask" task failed unexpectedly.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets(58,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets(58,5): error MSB4018:    at Microsoft.Data.Schema.Tasks.TaskHostLoader.Load(ITaskHost providedHost, TaskLoggingHelper providedLogger)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets(58,5): error MSB4018:    at Microsoft.Data.Schema.Tasks.DBBuildTask.Execute()
C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets(58,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)

I've noticed the following difference in the build log, which I think is relevant, but I don't know what is causing it.

Good project:

Overriding target "Build" in project "C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets" with target "Build" from project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.VisualStudio.TeamSystem.Data.Tasks.targets".

Failing project:

Overriding target "Build" in project "C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets" with target "Build" from project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.Common.targets".

Both DB projects include the following import (only):

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" />

Clues welcome!

1

1 Answers

3
votes

Ahh, the problem was that I didn't have the GDR release installed on the build server. One project was created with VSDB RTM, the other with VSDB GDR.

If only there were better error messages to help diagnose this!