Getting MSBuild and CruiseControl .NET to build and deploy VS2010 database projects

二次信任 提交于 2020-01-01 09:33:15

问题


I almost have a NAnt script together that will build and deploy VS2010 database projects, but one error stands in my way:

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)

I can see that the Microsoft.Data.Schema assemblies are not in the MSIL GAC on the build server - is there any clean way to do this without a full-freight installation of VS2010 on the build server?


回答1:


For the curious, I asked Barclay Hill at Microsoft who answered this for me:

You can’t build database projects on machines unless they have VS or TFS 2010 installed on them. It is not a supported scenario. You can deploy database project build outputs without VS/TFS installed using vsdbcmd. The only way to do this and be in line with the licensing and support is to install a local copy of VS Pro or higher on your build box if not using TFS.



来源:https://stackoverflow.com/questions/3988879/getting-msbuild-and-cruisecontrol-net-to-build-and-deploy-vs2010-database-proje

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!