使用 Visual Studio 2013 构建 SSIS 项目

Build SSIS project with Visual Studio 2013

我必须自动化我们构建和部署 SSIS 项目的方式。 我们使用VS2013、SQLSERVER2014和TFS2015。我已经知道两种解决方案:

1) MSBuild:我关注了这个博客 https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/,它在 VS2010 上运行良好,但不幸的是在 VS2013 上运行不佳。

我得到的错误是:

节点 1 上的项目 "SSISTest\SSISTest\SSIS.MSBuild.proj"(SSISBuild 目标)。 SSISBuild:**************正在构建 SSIS 项目:..\SSISTest\SSISTest.dtproj 用于配置:开发************** ------ 加载项目文件'..\SSISTest\SSISTest.dtproj' 将输出目录设置为“..\SSISTest\bin\Development” 将项目 ProtectionLevel 设置为 'DontSaveSensitive' 加载包'..\SSISTest\Package.dtsx' 错误:加载包“..\SSISTest\Package.dtsx”时出错:由于错误 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.",包无法加载。当 CPackage::LoadFromXML 失败时会发生这种情况。\r 错误 : 错误:由于错误 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.",包无法加载。当 CPackage::LoadFromXML 失败时会发生这种情况。\r 错误:\r 错误:在 Microsoft.SqlServer.Dts.Runtime.Package.LoadFromXML(字符串 packageXml,IDTSEvents 事件)\r 错误:在 Microsoft.SqlServer.IntegrationServices.Build.DeploymentFileCompilerTask.LoadPackage(字符串路径)\r 错误:在 Microsoft.SqlServer.IntegrationServices.Build.DeploymentFileCompilerTask.Execute() 完成构建项目 "SSISTest\SSISTest\SSIS.MSBuild.proj"(SSISBuild 目标)——失败。

2) devenv:工作正常,但我们的项目都受密码保护,每次您尝试构建它时都会提示对话框输入密码。

有没有其他方法可以在 VS2013 中自动执行此操作?

我会自己回答。在将 VS2013 的正确 dll 引用(特别是 Microsoft.SqlServer.ManageDTS 引用)添加到 http://sqlsrvintegrationsrv.codeplex.com/SourceControl/latest project, generating the .dll allowing MSBuild to build SSIS project as suggested by https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/ 后,工作正常。我现在能够使用 MSBuild 自动构建 SSIS 项目并将它们部署到 SQL Server 2014 实例。