I have a SSIS Package which is pulling data from ODBC source and loading it in OLEDB destination. The destination table does not contain an Identity column. I need to get the Max(Id) from the column and increment it by 1 for the next set of records. MaxId is retrieved and stored in a variable and the increment part is handled through C# code inside Script Component. The package execution is successful from Visual Studio, however when I try to deploy and run the package from Integration Service Catalog it throws below error:
"Script Component" failed validation and returned validation status "VS_ISBROKEN". The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.
The script build and rebuild is successful and the solution build was also successful.
The Visual Studio Solution was created in VS 2017, this is a new package that I have created using VS 2019. SSMS version is 2019. The TargetServerVersion is set to SQL 2017 in the solution. There are 4-5 projects inside the solution, approximately 40-45 packages and changing the TargetServerVersion is not a feasible solution.
Please find below the C# script from the script component: int i = 1;
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
/*
* Add your code here
*/
Row.RowNumber = this.Variables.MaxUID1 + i;
i = i + 1;
}