SSIS Execution Failed in C# .net console application - Script tag is corrupt
Chetan Virkar
0
Reputation points
Hi,
I have create a ssis package in visual studio 2022, in that package I have sql task and script tag.
To execute package I have created .net console application in vs 2022 with following code
string packagePath = @"Path of package";
Application app = new Application();
Package package = app.LoadPackage(packagePath, null);
package.Parameters.Add("DatabaseName", TypeCode.String).Value = "DatabaseName";
package.Parameters.Add("ServerName", TypeCode.String).Value = "ServerName";
DTSExecResult result = package.Execute();
Console.WriteLine("Execution Result: " + result.ToString());
foreach (Microsoft.SqlServer.Dts.Runtime.DtsError local_DtsError in package.Errors)
{
string resultado = local_DtsError.Description;
Console.WriteLine("Execution Result: " + resultado.ToString());
}
While execution it gives below error.
- The Script Task is corrupted.
- There were errors during task validation.
SSIS Setting : Deployment Target Version : sql server 2022.
Any tips on where / what to investigate next would be highly appreciated.
Chetan Virkar
Sign in to answer