7

我几乎有一个 NAnt 脚本,将构建和部署 VS2010 数据库项目,但我遇到了一个错误:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(56,5): 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. [xxx]
Failed to start MSBuild.
External Program Failed: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe (return code was 1)

我可以看到Microsoft.Data.Schema程序集不在构建服务器上的 MSIL GAC 中 - 如果没有在构建服务器上全货运安装 VS2010,是否有任何干净的方法可以做到这一点?

4

1 回答 1

13

出于好奇,我询问了微软的 Barclay Hill,他为我回答了这个问题:

您不能在机器上构建数据库项目,除非它们安装了 VS 或 TFS 2010。这不是受支持的方案。您可以在不使用 vsdbcmd 安装 VS/TFS 的情况下部署数据库项目构建输出。如果不使用 TFS,那么执行此操作并符合许可和支持的唯一方法是在您的构建盒上安装 VS Pro 或更高版本的本地副本。

于 2010-10-22T00:00:45.737 回答