Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS Script Tasks losing code

I have a very strange issue happening that is causing Script Task code to clear out. I have been able to test on 2-3 different machines. We are running SSDT 15.4 preview. The steps to reproduce were as follows.

  1. Create a script task inside of a foreach loop container.
  2. Create a comment in the script task.
  3. Change or add a variable mapping in the foreach.
  4. Save package.
  5. Close the package.
  6. Open the package.
  7. Open the script task and the comment will have vanished.

As my last attempt for success,I have upgraded to 15.5.1 and the problem still exists.

like image 411
DataNerd Avatar asked Feb 05 '18 19:02

DataNerd


People also ask

What is the difference between script task and script component in SSIS?

The Script task is configured on the Control Flow tab of the designer and runs outside the data flow of the package. The Script component is configured on the Data Flow page of the designer and represents a source, transformation, or destination in the Data Flow task.

How do I recompile a script in SSIS?

just open by Edit the script , and save, then press ok, the script will be re-compiled again.

Which languages can be used to code a script task in SSIS?

SSIS allows the developer to choose between two different scripting languages: C# or Visual Basic (VB). To see where you can make this choice, drop a Script Task onto the Control Flow design surface.

How do you add a breakpoint to a script in SSIS?

Click Script and then click Edit Script. In Microsoft Visual Studio Tools for Applications (VSTA), locate the line of script on which you want to set a breakpoint, right-click that line, point to Breakpoint, and then click Insert Breakpoint.


1 Answers

If you close/Cancel the Script Task Editor form in Visual Studio after editing code, the code will not save. This will occur even if the code was saved in the other Visual Studio editor - the one where you edit the code.

You MUST click "OK" for the code to save.

like image 61
RyboTech Avatar answered Oct 01 '22 00:10

RyboTech