I am trying to run my SSIS packages on MSDB with a console application, but I keep getting an error.
Application app = new Application();
Package package = app.LoadFromSqlServer("\\File\\Path\\" + paramName, ".", "MSDBUser", "password", null);
DTSExecResult result = package.Execute();
Console.WriteLine("Package Execution Results: {0}", result.ToString());
I keep getting the error:
"The Execute method on the task returned error code 0x80131621 (Mixed mode assembly is
built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0
runtime without additional configuration information.). The Execute method must
succeed, and indicate the result using an \"out\" parameter.\r\n"
I am thinking it has to do with the way I am calling the package to run my be outdated, but I am not really sure. Would anyone be able to help me out and provide some input on a better way to do this? Any help would be much appreciated. Thanks!
it seems that you've created a 4.0 framework project and now, you are trying to use 2.0 framework. In this post you can find all the settings you need in order to solve your problem.
User contributions licensed under CC BY-SA 3.0