C# 正在执行包含来自外部应用程序的脚本组件的SSIS 2012包
我正在编写一个应用程序,它将使用Microsoft.SqlServer.ManagedDTSV 11.0程序集执行SSIS 2012包。我尝试执行的包是从SSDT-2012设计并成功执行的,它包含处理无法正确传输的行的脚本组件 当我尝试运行我的应用程序时,我会收到每个脚本组件的错误消息: 管道:要在SQL Server数据工具之外运行SSIS包,必须安装Integration Services或更高版本的[Script Component Name] 配置:使用以下app.config文件在Windows上构建x86应用程序:C# 正在执行包含来自外部应用程序的脚本组件的SSIS 2012包,c#,ssis,C#,Ssis,我正在编写一个应用程序,它将使用Microsoft.SqlServer.ManagedDTSV 11.0程序集执行SSIS 2012包。我尝试执行的包是从SSDT-2012设计并成功执行的,它包含处理无法正确传输的行的脚本组件 当我尝试运行我的应用程序时,我会收到每个脚本组件的错误消息: 管道:要在SQL Server数据工具之外运行SSIS包,必须安装Integration Services或更高版本的[Script Component Name] 配置:使用以下app.config文件在Wi
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
有什么想法吗?运行应用程序的计算机上没有安装SQL Server Integration Services服务
另请参见这就是问题所在。谢谢这是一个荒谬的错误信息:/
using System;
using System.Data;
using System.Data.Common;
using System.IO;
using Microsoft.SqlServer.Dts.Runtime;
class MyApp
{
public void ExecutePackage()
{
//Assume I have all the variables I need like packageFile, packageName,
//srcConnectionString, destConnectionString and eventListener etc.
Package pkg;
Application app;
DTSExecResults pkgResults;
app = new Application();
pkg = app.LoadPackage(packageFile, eventListener);
pkg.Variables["SrcConnectionString"].Value = srcConnectionString;
pkg.Variables["DestConnectionString"].Value = destConnectionString;
if (null != srcAssembly || null != destAssembly)
{
foreach (ConnectionManager connection in pkg.Connections)
{
if (null != srcAssembly && connection.Name.Contains("Source"))
{
connection.SetQualifier(srcAssembly);
}
else if (null != destAssembly && connection.Name.Contains("Destination"))
{
connection.SetQualifier(destAssembly);
}
}
}
pkgResults = pkg.Execute(null, null, eventListener, null, null);
}
}