OK...I have my first SSIS package that uses a Scripting object. I clicked the Script button and wrote a procedure in the Visual Studio for Applications IDE.
Now I want to reuse this code in another package.
What is the best practice to avoid Control+C, Control V?
Quoting MSDN on reusing Script Task that is present in Control Flow
toolbox. Here is the link to MSDN.
If more than one package uses a script, consider writing a custom task instead of using the Script task. For more information, see Developing a Custom Task.
Quoting MSDN on reusing Script Component that is present within Data Flow Task
. Here is the link to MSDN.
The Script component provides an easy and quick way to include custom functions in a data flow. However, if you plan to reuse the script code in multiple packages, you should consider programming a custom component instead of using the Script component. For more information, see Developing a Custom Data Flow Component.
Other alternatives that you can look into are:
Create a .NET library with the reusable logic and register the DLL in GAC. Once it is registered in GAC, you can reference the library in Script Task or Script Component. Here is a link that describes about this.
You can also have a look at the third-party components Script Task Plus and Script Component Plus developed by CozyRoc.
Hope that helps.