I'm trying to build a db project using msbuild.exe, running on a VM with Windows Server 2008 R2 Enterprise for 64-bit OS. Most of my applications are building successfully, this one DB project is giving me problems. .NET Framework 2 and 4 are installed.
error MSB4062: The "SqlBuildTask" task could not be loaded from the assembly Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
I have already checked out a possible solution on this site: Getting MSBuild and CruiseControl .NET to build and deploy VS2010 database projects
However I do have VS2010 installed on my build machine, and I still get this error
Things I have done already:
- Checked that the solution with the DB project builds successfully in VS2010
- Run the msbuild command using msbuild MyDBtest.dbproj - This gives me the same error.
What else could I be missing to get this to work?