SSIS 2012 Custom Component Install Guidelines


Visual Studio 2010 needs to be installed, SQL Server 2012 needs to be installed, and the Microsoft .NET Framework 4.0 needs to be installed. I would expect that all the service packs are up to date and the versions are at least developer for both visual studio and sql server.

I’ll give you a little demo that I found to give you some flavor in creating a very simple Custom Component. The idea is easy and the steps are important in this process. So we will show this with our Hello World example. First we want to open Visual Studio 2010 and create a C# Class Library. Within our class we want to add a namespace reference to Microsoft.SqlServer.Dts.Pipeline. We also want to add the DLL reference to Microsoft.SqlServer.DTSPipelineWrap and the Microsoft.SqlServer.PipelineHost.

Next we want to add a strongly named key file:

signedfile

Lastly we add the our code for the Transform as follows:

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

namespace HelloWorld
{
    public class CustomComponents
    {
        [DtsPipelineComponent(DisplayName = "HelloWorld",
             ComponentType = ComponentType.Transform)]

        public class HelloWorldComponent : PipelineComponent
        {
            public override void ProcessInput(int inputID, PipelineBuffer buffer)
            {
                int numberOfRows = buffer.RowCount;
                bool eof = buffer.EndOfRowset;
            }

        }
    }
}

Once we compile this depending on how you set up your debugging and releases you can find the HelloWorld.dll in the Projects Binn Directory.

Next we need to add the Assemblies to the SQL Server 2012 DTS directory. We want to get the assemblies located in the Project Solutions Bin folders which are a .dll extension. There are 2 directories one is for Components and the other is for Tasks. The components we will add to C:\Program Files (x86)\Microsoft SQL Server\110\DTS\PipelineComponents directory. The Tasks we will add the C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Tasks directory.

First thing we want to do is locate the .NET assembly folder and the .NET GAC directory so we can register the DLLs.

The .NET assembly directory is located in C:\Windows\Microsoft.NET\assembly\GAC_MSIL and is where we will start to see all the assemblies load as we register them.

Add all the DLLs to the main visual studio directory were the GACUTIL is located for ease of registering.  This directory is located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC

So we now go into the visual studio command prompt to run the GACUTIL to register our assemblies. We use the gacutil /i HelloWorld.dll (the command followed by the DLL which is located in the same directory)

Once we register and add all the DLLs we can now open a SSIS projects and update the toolbox. 

Simply enough to update the SSIS toolbox we just right click on the SSIS Toolbox and choose refresh toolbox to see the new components.

23 thoughts on “SSIS 2012 Custom Component Install Guidelines

  1. Pingback: SSIS 2012 Custom Component Install Guidelines. | jessekraut

  2. Thanks for the post.

    I would just like to add that you need to sign your assembly (as your screenshot shows) before registering the assembly.
    Also note that the SSIS Toolbox changes depending on the tab you are in (Control Flow Vs Data Flow) and this example is for data flow.

    Hopefully this will save someone else who is new to SSIS some time.

  3. Can i use this tutorial if I have installed VS 2012 and SQL 2012.
    If i can`t, do you have another tutorial for that?

    Thank you in advance

  4. I missed something … I installed VS2010 SQLServer 2012 all patches and If y use the microsoft.sqlserver namespace y get only server and not dts
    What do I need to install?

    • Hi Rainer,

      Check out my other link below it explains where you can get the reference so that the namespace will appear. You need to get to the SQL Server SDK assemblies directory to add the reference this will be on the server if that is where you are developing the component (C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies) if you are not on the server then you will need to install the Management Studio tool so that it will install that same directory with the SDK assemblies. If have any questions let me know.

      https://jessekraut.wordpress.com/ssis-2012-custom-component-development-process/

  5. Thanks a lot nearly finished but I get stacked on the “Next we want to add a strongly named key file:” is there a step by step link anywhere ?

  6. Find the solution and it run’s like expected, I copy the dll into the DTS\PipelineComponents directory and start a new proyect but the component did not pop up ……

    • I added an image to the guidelines page that shows the strongly named key file config. This is located by going into the properties of the project and going to the signing section. You just need to add one to the project by selecting new and you should be good.

  7. Hello, do you know if there are any issues with doing all this on a 64 bit machine? I’m running VS2012 Enterprise with BIDS and SQL2012 on Windows 7 Enterprise with .NET 4.5. I followed the steps you outlined with a dll i inherited. Yet, i don’t see the assembly in GAC_MSIL and not in the SSIS Toolbox after refresh. Just to be thorough, i copied dll in both \Program Files and \Program Files (x86). I can see the dll in windows\assembly. Thanks!

      • Yes, i ran the gacutil.exe on the dll and it confirmed that the assembly was added. one other thing about my system is that i have multiple versions of both VS and SQL. Might that be an issue. Still stumped.

      • Corey I’m not sure if you wrote the component but how it was compiled is important and what dlls were used. For 2012 and for the 64 bit environment. If the dlls are for 2008 r2 or you have the components compiled for 32 bits the you will have issues.

  8. Hi, I am using VS 2010 and SQL 2012 on a Windows 2008 R2 64 bit server. I am trying to get some custom tasks that I received from the Consultant added in the toolbox. When I try to run gacutil on the command prompt c:\Program Files (86)\Microsoft Visual Studio 10.0\VC, I am getting the error that GACUTIL is not recognized as an internal or external command. Should I be using some other path instead? Your help on this would be appreciated.

      • Hi, I have developed a new component in a virtual machine using visual studio 2010 but i want to install it in a client server but I can´t rebuild the dll in that server because I only have installed ssis developing components with sql server 2012 so I can´t register the dll into GAC because gacutil is not installed. I have tried to install visual studio 2010 SDK but gacutil.exe didn´t exists after that. Is there any other program or framework that i have to install??

  9. It is still not working. The dll is registered in c:\Windows\assembly but not in C:\Windows\Microsoft.NET\assembly\GAC_MSIL

    • One thing you need to try is install the .net framework that the component was built in on the server and then search for the gacutil which should be in a folder in the .net framework version. Then use the gacutil from there and it should register properly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s