我正在按照文档 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和相关文件夹即可。
最佳答案
我在这里遇到的问题是,经过进一步调查,我们发现要使用 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。
关于c# - 部署自定义 SSIS 2012 组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24883912/