Referencing a custom component inside a SSIS Script Task

If you need to access a custom component from a Script Task, the component must first be signed and gac’ed. After it has been gac’ed, the assembly must also be copied to  the .net2.0 framework under the windows directory.

The component I created was compiled under .net3.5 so I copied the assembly to the following folder C:\Windows\Microsoft.NET\Framework\v2.0.50727

Now click the Edit Script button on the Script Task Editor.


This will now open the editor. From here you can add the reference to your DLL by right clicking on the References folder in the Project Explorer and click Add Reference.


You should now be able to view your assembly in the list as highlighted above.

I you get the following error whilst adding a reference, click No. The default .Net framework is 2.0 so if you have compiled your custom component under .Net3.5 you must set the target framework of the script editor to 3.5


This is achieved by Right clicking on the project and select properties as shown below.


Now change the target framework to your compiled version. In my case is was 3.5



This entry was posted in SQL. Bookmark the permalink.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s