Search code examples
c#visual-studiosql-server-data-toolsdtsscript-task

Develop a dll on Visual Studio and embed it on a dtsx


SSDT has the Script Task that allows developing custom code in C# that's able to process data inside SSIS streams.

But this solution is very ugly, because every time we need to edit that code a Visual Studio instance is opened, and it must be closed so we can execute the dtsx. And then when it's executed inside SSDT, a VS instance is opened again, and when the execution finishes it's closed.

Is there a way to, instead of opening VS from SSDT, to develop code directly in VS, referencing SSIS API, and then compile it into a dll and embed it in SSDT?

Or, at least to keep VS opened and "bound" to SSDT, so we can develop and use its debugger?


Solution

  • If you only care about separation of coding and SSIS you can just try to have it as an application(.exe) and have it executed using Execute Process Task.

    In that way you separate coding from SSDT, also you can now have an option to store it in a git repo to track changes and just do deployment on the specified path of your .exe that you set in the Execute Process Task.

    In debugging it, I think VS has a capability to use Attached to Process then when your SSIS hits your app it will trigger breakpoint. But take note that you must point your Execute Process Task to .exe generated by debug mode.

    Hope that helps.