
LblStatus.Text = "Package result: " + myResult.ToString() = "test123" ĭTSExecResult myResult = myPackage.Execute() Optional set the value from one of the SSIS package variables

LblStatus.Text = "Loading package from file system." Load package from file system (use LoadFromSqlServer for SQL Server based packages) Application myApplication = new .Application() Private void btnStart_Click(object sender, EventArgs e) I created a very simple form with a start button (btnStart) and a label (lblStatus) to show the execution result. The Execute method must succeed, and indicate the Runtime and cannot be loaded in the 4.0 runtime without additionalĬonfiguration information.). The Execute method on the task returned error codeĠx80131621 (Mixed mode assembly is built against version 'v7' of the If you don't do this you will get the following error in SSIS: See screendump for location.īecause apparently this new referenced dll is some kind of mixed mode compiled dll, you need to add useLegacyV2RuntimeActivationPolicy="true" to the app.Config. Now browse to the 2012 version of ManagedDts.dll. Right click References in the Solution Explorer and click "Add Reference". We need a reference to to call a package.


Confirm the question about changing the framework version A new window will open and there you can change the Target framework to 4. Right click the project and select properties.
#Locad configuration from vshost.exe.config windows#
Start Visual Studio 2010 and create a new C# Windows Form Application project.Ĭhanged the framework version to 4 in the newley created project. See this example for project deployed packages. Note: this example cannot handle (project) parameters that are available in 2012. How do you do that?įor this example I will use Visual Studio 2010 (same as for SSIS 2012) and a C# Windows Form Application for this example. I want to start a SSIS 2012 package from a.
