2.2. Building a Custom Assembly
Extending SSIS to use libraries within the .NET Framework is very powerful. Imagine having a corporate encryption algorithm that you must adhere to. Rather than having to rewrite this in SSIS, you could reference the assembly that has already been written from within a Script Task or Component. The ability to access custom functionality provided through assemblies that are either built in-house or proprietary to an organization takes SSIS packages to the next level. Instead of rewriting custom code within a task that may already be encapsulated within an organization's framework, using external assemblies provides an object-oriented approach by promoting code re-use. Code can now reside within an assembly or one location, and then be referenced from multiple tasks.
To create a new assembly, open Visual Studio 2005 and create a new Visual Basic .NET class library, as shown in Figure 2-5. You can also add this project to your existing SSIS solution to keep every dependency organized in the same container. A class library project is the type of the project to use when you need to create assemblies.
Figure 2-5. Creating a Visual Basic .NET class library
Note that there is no user interface for class library projects like there would be for Windows or web projects. Instead, you will see that a default class is created. For this example, change the class ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access