2012-08-01 45 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類型。

相關問題