Sandu
Sandu

Reputation: 66

SSIS: How to programmatically reference child packages?

I have an SSIS package which in turn uses multiple child packages in it with execute package task. I am trying to run the parent package prorammatically using code similar to the following:

Application app = new Application();
Package package = app.LoadPackage(ConfigurationManager.AppSettings["PackagePath"], null);
DTSExecResult results = package.Execute();

But when I execute the package I get an exception saying "There is no project to reference". How do I reference the child packages?

Upvotes: 3

Views: 2550

Answers (2)

whobetter
whobetter

Reputation: 65

Are you using a ReferenceType of "Project Reference" in your parent SSIS package? If so, change it to "External Reference", and provide the file path of the package, as shown in this question.

Upvotes: 1

Sandu
Sandu

Reputation: 66

I couldn't figure out how to do this using the file system path. But I was able to make it work after deploying the project with the parent and child packages to a SSIS Catalog by using code similar to whats explained in the following link.

http://muxtonmumbles.blogspot.com/2012/08/programmatically-executing-packages-in.html

Upvotes: 0

Related Questions