让MSBuild和CruiseControl .NET构建和部署VS2010数据库项目

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)

我看到在构建服务器上的MSIL GAC中没有Microsoft.Data.Schema程序集 - 是否有任何干净的方法可以不需要在构建服务器上进行完整的VS2010安装来解决此问题?

1个回答

13

对于好奇的人,我向微软的巴克利·希尔询问了这个问题,并得到了答复:

如果机器上没有安装VS或TFS 2010,则无法在其上构建数据库项目。这不是受支持的场景。您可以使用vsdbcmd在没有安装VS / TFS的情况下部署数据库项目构建输出。如果不使用TFS,则为遵守许可和支持协议的唯一方法是在您的构建计算机上安装VS Pro或更高版本的本地副本。


3
TFS很好,但并不是唯一的构建工具。我的原则是不在构建服务器上安装VS200x或201x,这样所有依赖项都不会被“隐藏”......(当然我不生你的气(Brandon),谢谢你提供信息)。微软帮助我谋生,但有时他们真是让我火大。 PS点赞支持回答。 - granadaCoder

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接