(Refer to my previous post on this topic.)
I was recently troubleshooting a custom object I'd constructed from my template - and (maddeningly) it didn't work! Of course, trying to spot the undeniably simple problem in the wee hours isn't always productive... but it does sometimes help get some productive supporting work done. In this case, I came up with the brilliant hypothesis that builds of my components were interfering with each other, so I decided to revisit my post-build commands.
The good thing, I suppose, was that I only made the decision to do that in the wee hours - because the actual problem had nothing to do with that, but I couldn't see that in my befuddled state. I packed it in and made the execution of that decision my first task the next morning. I wanted to remove all possibility of "clutter" of previously registered/copied components and tasks could have caused. Unfortunately, the project properties in Visual Studio has no "clean" command that corresponds to the "post-build"... maybe they should add that...
Since that didn't exist, I needed a batch file that would remove all (installed) traces of a particular SSIS custom object. In order to reliably do so, I needed to review my "install" script - the post-build events. I decided I would kill two birds with one stone and encapsulate the several lines that were in my post-build into one batch file - and make it multi-purpose, able to install Tasks, Components, and ForEachEnumerators. (Those are the kinds of custom objects I've built so far.) In the end, I planned to have two batch files - an "installer" and an "uninstaller". Of course, neither of those could add or remove the object(s) from the BIDS toolbox. Maddeningly, you still have to do that by hand - vote for this Connect issue if you want that resolved.
The result - a fairly large pair of batch files. I'll share them now to avoid recrimination on pointing people towards an inferior solution earlier... Find those batch files on my SkyDrive. The batch files are easily extensible to the other types of custom objects - I leave that as an exercise for the reader...
No comments:
Post a Comment