0

I have a Integration Services Project with a Script Task. The Script Task Code is written in C#.

I set some breakpoints at different locations in the code, one right at the beginning. The breakpoints are working in general, when I start debugging the SSIS project the VSTA Windows opens and execution stops at the first breakpoint (as it should).

I now try to add the execution of a SSIS package as described here:

https://learn.microsoft.com/de-de/sql/integration-services/ssis-quickstart-run-dotnet?view=sql-server-ver15

I start with the following:

string folderName = "FUNDAMENTAL";
string projectName = "1001_IMPORT_ENTSOE_XML";
string packageNameSSIS = "1001_IMPORT_ENTSOE_XML.dtsx";
string sqlConnectionString = "Data Source=SERVER; Initial Catalog=master; Integrated Security = SSPI;";

SqlConnection sqlConnection = new SqlConnection(sqlConnectionString);

Breakpoints still working.

However, when I add the next line of code, all breakpoints are ignored and the VSTA windows does not open. Instead, the code runs until the end successfully.

IntegrationServices integrationServices = new IntegrationServices(sqlConnection);

Why?

  • 1
    A similar bug was fixed in a recent update of VS 2019. Which version do you use, and is it up to date? – HoneyBadger Mar 10 '21 at 11:52
  • Debugging the script tasks / script components really is a pain in the a.... and this since many many versions. However, I usually add some FireInformation or FireWarning lines - this helps debugging these objects enormously. – Tyron78 Mar 10 '21 at 12:06
  • SSIS C# debugger issue goes many years back, and the causes are many. Have you tried anything from answers here: https://stackoverflow.com/q/41470415 - ? – Roger Wolf Mar 10 '21 at 13:10
  • If it has any complexity to it most of the time I write my C# Script task as a console app first, super easy to edit, test, and debug. Then once all is good I transfer it to the C# Script task (many times it takes some tweaking to work from console to script task, especially variable passing. Seems like more work but much easier to test/debug. Sometimes its not feasible but works most of the time. – Brad Mar 10 '21 at 13:33

1 Answers1

0

Sorry I am not able to add a comment . Try adding the script code to new console application project and try to run it through there . I think the code is not able to be build . There might be some missing assembly reference. You can easily get the error by debugging the console application. Also try changing the ssis package run 64 bit property.

MetaData
  • 116
  • 11