Wednesday, March 7, 2012

Custom Dataflow Transform in Programmatically Built Package

I'm building packages programmatically and all is well. I have a new custom transform that I developed. It also works fine. Now I'm trying to add my new component to my packages when I programmatically build them, and I'm unable to do that.

Has anyone added their own custom components to a programmatically built package successfully?

I get a COM error on the line that calls ProvideComponentProperties. I've attempted various modifications including not overriding ProvideComponentProperties or just having it do nothing. I always get the same result. What I don't understand is that the custom transform works and handles ProvideComponentProperties fine when it is added to a package in BIDS.

Thanks.

'Add new dataflow task

combitronics = dataFlow.ComponentMetaDataCollection.New()

'Set assembly to my component

combitronics.ComponentClassID = "Ewrap.SSIS.Combitronics"

'Get instance of component

Dim instance As CManagedComponentWrapper = combitronics.Instantiate()

'Initialize component ***Error Occurs Here***

instance.ProvideComponentProperties()

...

Have you tried debugging your custom component. The only other thing I could suggest is where the component is deployed to.|||

Thanks for the response.

It looks like I'm using the wrong name for my assembly when calling it. I found I could specify the GUID instead of the Namespace.Name format and that solved the problem. I got the correct GUID by looking at the .dtsx file after renaming it to .xml so it's easily viewed in IE.

No comments:

Post a Comment