Archive

Archive for March, 2012

SSIS – dll assembly reference

March 8, 2012 1 comment

It is a very common scenario to reference dll while working with SSIS. Here would like to document on the process of converting C# code into .dll and then referencing to SSIS package.

Step 1:
Create C# project with required requirements (not presenting C# code program)


Step 2:
Select the properties of the project to get the options


Step 3: Select the Target framework version, Most of the times we will consider to take the version of BIDS, please consider selection of higher version won’t support as BIDS.
We have many options at these properties as user-friendly namespace, picture for the dll etc besides having the default values


Step 4: Selection of output Type gives the options of compile file as exe, dll or windows app, here selecting the class library to get the target as dll


Step 5: Build the file, default we will get the dll in the bin folder of the project, here we could have the options of selecting friendly target names and target folder to direct the compiled dll file


Step 6: Place the dll file into SQL Server Assemblies, we could get the path of SQL Server as


Step 7: Created a SSIS package include Script component as


Step 8: Open the Script component, and go to the references and Add Reference as


Step 9: Browse to the dll at SQL Server assembly


Step 10: Selecting the dll from assemblies will give the reference at SSIS package as


Points to consider:

1. We could also use this dll reference in Script Task in Data Flow level
2. It is one of the scope to discuss the C# code and its properties i.e. Public and Private class, However setting we could only get the reference of Public methods in BIDS
3. To my limited knowledge at C#, planned to present only the process of dll reference in SSIS rather than the content of C# code

Advertisements
Categories: SSIS Tags: