2012-08-01 37 views
4

我正在尝试使用msbuild.exe构建数据库项目,并在VM Server上运行Windows Server 2008 R2 Enterprise适用于64位操作系统。我的大多数应用程序都在成功构建,这个DB项目给我带来了问题。 .NET Framework 2和4已安装。错误“SQLBuildTask”任务无法从asssembly中加载'Microsoft.Data.Schema.Tasks.Sql'

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.

我已经检查出这个网站可能的解决方案:Getting MSBuild and CruiseControl .NET to build and deploy VS2010 database projects

但是我有我的构建机器上安装了VS2010,我仍然得到这个错误

事情我必须已经完成:

  • 检查了带有DB项目的解决方案在VS2010中成功构建
  • 使用msbuild运行msbuild命令MyDBtest.dbproj - 这给我同样的错误。

还有什么我可以错过,让这个工作?

回答

4

原来我执行错误版本的MSBuild for dbproj我需要使用C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319中的一个,而不是C:\ Windows \ Microsoft.NET \ Framework64 \ V2.0.50727。早期版本不支持.dbproj类型。

相关问题