【问题标题】:Deploying Custom SSIS 2012 Component部署自定义 SSIS 2012 组件
【发布时间】:2014-07-22 09:40:57
【问题描述】:

我正在尝试部署一个基本的自定义组件,遵循文档here

我的自定义组件代码如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SqlServer.Dts.Pipeline;

namespace MattsCustomComponent
{
    [DtsPipelineComponent (DisplayName = "Matts Custom Component", ComponentType =    ComponentType.Transform)]
    public class MattsCustomComponent : PipelineComponent
    {
        public override void ProcessInput(int inputID, PipelineBuffer buffer)
        {
            int numberOfRows = buffer.RowCount;
            bool eof = buffer.EndOfRowset;
        }

    }
}

如您所见,它非常基础。但是当我将 dll 部署到 GAC 和 C:\Program Files\Microsoft SQL Server\100\DTS\PipelineComponents

它没有出现在 SSIS 工具栏中,是我在添加自定义组件时遗漏了什么吗?网上的指南似乎都说你只需要将dll复制到gac和相关文件夹即可。

【问题讨论】:

    标签: c# sql-server ssis


    【解决方案1】:

    我在这里遇到的问题是,经过进一步调查,我们发现要使用 Visual Studio 2012,在使用 ssis 项目时需要安装 SQL Server 2012。

    如果自定义组件是使用 sql server 2008 程序集构建的,则该组件将只能在 Visual Studio 2008 中使用。

    如果自定义组件是使用 sql server 2012 程序集构建的,则该组件将只能在 Visual Studio 2012 中使用。

    目前唯一的解决方案是安装 Visual Studio 2008,并在我们也迁移到 SQL Server 2012 后将项目迁移到 Visual Studio 2012。

    【讨论】:

      【解决方案2】:

      在命令提示符中使用gacutil /i YourComponentPath 以安装您的自定义组件。

      您可以使用以下参考来安装您的组件:

      Installing Custom SSIS Components into GAC Using PowerShell

      【讨论】:

      • 这不是我用来安装它的,但仍然没有出现。我可以看到它已成功添加到 GAC 中
      【解决方案3】:

      这也发生在我身上。我已将 .dll 安装到 GAC,但该组件不会出现在 Visual Studio (SSDT) 的 SSIS 工具箱中。

      对我有用的是在 SQL Server 的 32 位文件夹结构下安装 .dll。

      C:\Program Files (x86)\Microsoft SQL Server\110\DTS\PipelineComponents
      

      我怀疑这是因为 SSDT 也是 32 位的。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-02-21
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多