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

Bra*_*ton 7 cruisecontrol.net msbuild gac database-project visual-studio-2010

我几乎有一个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)
Run Code Online (Sandbox Code Playgroud)

我可以看到Microsoft.Data.Schema程序集不在构建服务器上的MSIL GAC中 - 如果没有在构建服务器上完全安装VS2010,有没有干净的方法来执行此操作?

Bra*_*ton 13

对于好奇的人,我问微软的Barclay Hill,他为我解答了这个问题:

除非在计算机上安装了VS或TFS 2010,否则无法在计算机上构建数据库项目.它不是受支持的方案.您可以使用vsdbcmd在不安装VS/TFS的情况下部署数据库项目构建输出.执行此操作并与许可和支持保持一致的唯一方法是,如果不使用TFS,则在构建框上安装VS Pro或更高版本的本地副本.

  • TFS很棒.但它不是那里唯一的构建工具.我的规则是在构建盒上没有VS200x或201x.因此所有的依赖关系都不是"隐藏"......(当然,不要生你的事(布兰登),谢谢你的信息.))微软帮助我谋生,但男人,每隔一段时间他们就会得到我的山羊.PS Upvote响应. (3认同)