简体   繁体   English

Visual Studio 2019 - 无法将自定义管道 Object 添加到工具箱 SSIS

[英]Visual Studio 2019 - Cannot add Custom Pipeline Object to Toolbox SSIS

All I'm trying to accomplish right now is get my custom component to show up in the SSIS Toolbox.我现在想要完成的只是让我的自定义组件显示在 SSIS 工具箱中。 I've been looking everywhere I can think of for any information about creating a custom Data Flow Component in Visual Studio 2019. I have found plenty of out-dated examples and solved problems, none of which help me solve my problem.我一直在寻找有关在 Visual Studio 2019 中创建自定义数据流组件的任何信息。我发现了很多过时的示例和已解决的问题,但没有一个可以帮助我解决我的问题。

Based on Microsoft's description of how to do this, you would think all you have to do is follow their instructions and it'll work.根据 Microsoft 对如何执行此操作的描述,您会认为您所要做的就是按照他们的说明进行操作,它就会起作用。 Not so, at least not for me yet.不是这样,至少对我来说还不是。

Here's what I've done so far in an attempt to simplify and get anything to work:到目前为止,这是我为简化并让任何工作正常所做的工作:

  1. I Created a class library and referenced the following assemblies:我创建了一个 class 库并引用了以下程序集:
  • Microsoft.SqlServer.DTSPipelineWrap Microsoft.SqlServer.DTSPipelineWrap
  • Microsoft.SQLServer.DTSRuntimeWrap Microsoft.SQLServer.DTSRuntimeWrap
  • Microsoft.SQLServer.ManagedDTS Microsoft.SQLServer.ManagedDTS
  • Microsoft.SqlServer.PiplineHost Microsoft.SqlServer.PiplineHost
  1. Inherited from PipelineComponent and added the DtsPipelineComponent attribute.继承自 PipelineComponent 并添加了 DtsPipelineComponent 属性。

  2. Overridden methods (code below)重写的方法(下面的代码)

  3. Signed the assembly签署大会

  4. Created Post-build events to install into the GAC and copied the assembly to the C:\Program Files\Microsoft SQL Server\130\DTS\PipelineComponents folder.创建要安装到 GAC 的构建后事件并将程序集复制到C:\Program Files\Microsoft SQL Server\130\DTS\PipelineComponents文件夹。

  5. In an SSIS project, I do a refresh on SSIS Toolbox and my component does not show up.在 SSIS 项目中,我对 SSIS 工具箱进行了刷新,但我的组件没有出现。 I've tried Browsing to the assembly by going to Tools >> Choose Toolbox Items and selecting the assembly.我已经尝试通过转到工具>>选择工具箱项目并选择程序集来浏览程序集。

I get this message:我收到这条消息:

在此处输入图像描述

Here is my simplified code that does nothing: Sorry about having posted it using an image, but using the recommended code highlighters don't work for me either.这是我的简化代码,它什么都不做:很抱歉使用图像发布它,但使用推荐的代码荧光笔也不适用于我。

在此处输入图像描述

Here is a screenshot of the GAC listing:这是 GAC 列表的屏幕截图:

在此处输入图像描述

I must be missing something.我肯定错过了什么。

Any help or ideas would be greatly appreciated.任何帮助或想法将不胜感激。 If I can't get this to work, I'll have to punt and resort to a Script Component transformation.如果我不能让它工作,我将不得不放弃并求助于脚本组件转换。 Really hate to do that as that means each developer will have to maintain a lot of extra code.真的很讨厌这样做,因为这意味着每个开发人员都必须维护大量额外的代码。

Thank you in advance.先感谢您。

Hazy recollection but I'll give it a go.模糊的回忆,但我会给它一个 go。

The installation to the GAC means that when the package runs, the execution engine will be able to find the required assemblies and do the code instructions.安装到 GAC 意味着当 package 运行时,执行引擎将能够找到所需的程序集并执行代码指令。

Design-time needs the assemblies elsewhere because...reasons.设计时需要其他地方的程序集,因为......原因。 With 2005/2008, you had to manually add items to the "SSIS Toolbox."对于 2005/2008,您必须手动将项目添加到“SSIS 工具箱”。 You are attempting to add items to the "Toolbox" which is a confusingly similar name but it's not SSIS.您正在尝试将项目添加到“工具箱”,这是一个令人困惑的相似名称,但它不是 SSIS。 SSIS Toolbox is populated only when a package is opened and the project type is SSIS.仅当打开 package 并且项目类型为 SSIS 时,才会填充 SSIS 工具箱。

在此处输入图像描述

Visual Studio now automagically picks up components but either way, the assemblies need to be sitting in the targeted version Microsoft SQL Server XXX DTS assembly-domain folder. Visual Studio 现在自动拾取组件,但无论哪种方式,程序集都需要位于目标版本 Microsoft SQL Server XXX DTS 程序集域文件夹中。

Assume I build a dataflow component with bindings for SQL Server 2017. I would therefore install to假设我为 SQL Server 2017 构建了一个数据流组件。因此我将安装到

C:\Program Files\Microsoft SQL Server\140\DTS\PipelineComponents

If you built a custom task, it'd go to如果您构建了一个自定义任务,它将 go 到

....\DTS\Tasks

That's going to require admin rights but you already needed them for GAC'ing the assembly as well.这将需要管理员权限,但您已经需要它们来 GAC 处理程序集。

This Red-Gate article seems to confirm what I'm saying as well.这篇红门文章似乎也证实了我所说的。 Developing a Custom SSIS Source Component 开发自定义 SSIS 源组件

If you've got smart developers, you might also take a look at using Biml to create your SSIS packages.如果你有聪明的开发人员,你也可以看看使用Biml来创建你的 SSIS 包。 With it, you can have a single Script Task/Component defined for the common project and whenever you emit the Biml into SSIS packages, they all use the same common core bit of logic.有了它,您可以为公共项目定义单个脚本任务/组件,并且每当您将 Biml 发送到 SSIS 包中时,它们都使用相同的公共核心逻辑位。 No subtle copy/paste inheritance like you can run into if you don't go custom component route.如果您不使用 go 自定义组件路径,则不会像您遇到的微妙复制/粘贴 inheritance 那样。 Or you use a declarative framework for describing your packages, aka Biml.或者您使用声明性框架来描述您的包,也就是 Biml。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法添加自己的自定义 EFDataAcces 库 Visual Studio 2019 - Cannot add own custom EFDataAcces Library Visual studio 2019 Visual Studio 2015 SSIS - SSIS工具箱中未选择自定义SSIS组件 - Visual Studio 2015 SSIS - Custom SSIS component not picked up in SSIS toolbox DataGridView 在 Visual Studio 2019 工具箱上不可用 - DataGridView not avaiable on Visual Studio 2019 ToolBox 如何在Visual Studio 2015中创建自定义控件并将其添加到工具箱 - how to create custom control in visual studio 2015 and add it to toolbox 如何将自定义Windows窗体控件添加到Visual Studio工具箱 - How to add a Custom Windows Forms Control into Visual Studio Toolbox Visual Studio 2019 class 图表设计器工具箱为空 - Visual Studio 2019 class diagram designer toolbox empty Visual Studio 2019 Community 工具箱没有 webbrowser 控件 - Visual Studio 2019 Community toolbox has no webbrowser control 无法在 Visual Studio 2019 中添加新的 C# windows 表单 - Cannot add a new C# windows form in Visual Studio 2019 如何在自定义模板 Visual Studio 2019 中添加多个选项 - How to add multiple options in custom template Visual Studio 2019 Visual Studio 未将自定义用户控件添加到工具箱 - Visual Studio not addin custom user control to toolbox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM