Lawrence JM

My feedback

  1. 79 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    26 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 47

    <=-=Jun 26 2017 1:02AM=-=>

    I have had the exact same issue, intermittently whenever I open script tasks all my code seems to have vanished and all the “ReadOnlyVaraiables” and “ReadWriteVariables” have also disappeared. It happens for c# and VB script tasks. This is is extremely frustrating and is impossible to develop a project when code randomly keeps disappearing. I’m wondering if this is a bug with Visual Studio 14.0.23107.0 D14REL. Can anyone at Microsoft shed some light on this please?

    <=-=Jun 29 2017 10:45PM=-=>

    Got the same problem. Seems like the Script Task is cleared when the project/Visual Studio i closed/shut down.

    <=-=Jul 18 2017 5:38PM=-=>

    Same problem for me, too. Once the original code in Script Task was still present after reloading the solution. But after that they are gone, along with ReadOnly/ReadWriteVariables and ConnectionManagers. I’m using SSDT 14.0.61705.170 (which just came out) with VS 14.0.25431.01 update…

    Lawrence JM commented  · 

    Tom Phillips is reporting over on the MSDN SSDT sub-forum that that version 15.6.0 may contain a fix for this issue:

    https://docs.microsoft.com/en-us/sql/ssdt/changelog-for-sql-server-data-tools-ssdt?view=sql-server-2017

    "Fix an issue that sometimes variable list of ScriptTask will disappear in task UI".

    Lawrence JM commented  · 

    We have been dealing with this problem intermittently for several years, and recently conducted a thorough investigation of the issue. Here's what we found:

    The problem occurs when:

    - There is a Foreach Loop or For Loop Container,
    - Which contains child Script Tasks,
    - And the user opens the Foreach Loop or For Loop Editor.

    The problem is now triggered; when the user next saves, Visual Studio will fail to write the following properties of each child Script Task to file:

    - ReadOnlyVariables,
    - ReadWriteVariables,
    - Any and all Script Task code.

    The insidious part of the problem is that even though the file on disk no longer contains these properties, *the Visual Studio UI keeps them in memory and will act as if this data still exists*. It is only after the project is closed and reopened will it become apparent that this data has been lost.

    We do not have a solution at this time. However, we have successfully instituted the following workarounds:

    1. Avoid using the Foreach Loop and and For Loop Editors (i.e. where possible, change properties in the Properties panel instead).

    2. If the Editors must be used, then: move all child objects outside of the relevant container; make your changes; save; and then return the child objects back to the container.

    Final note: this problem does not appear to occur with Sequence Containers (which have no Editor interface). It may affect child objects other than Script Tasks - we did not test extensively in this area.

    Additional Resources:

    - https://feedback.azure.com/forums/908035-sql-server/suggestions/33215863-ssis-script-tasks-losing-code

    - https://social.msdn.microsoft.com/Forums/sqlserver/en-US/059012f7-180c-43a0-a0b7-3a40b8569a6f/script-task-drops-code-in-ssis-package?forum=ssdt

    Lawrence JM supported this idea  · 
  2. 90 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    under review  ·  17 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Lawrence JM commented  · 

    Tom Phillips is reporting over on the MSDN SSDT sub-forum that that version 15.6.0 may contain a fix for this issue:

    https://docs.microsoft.com/en-us/sql/ssdt/changelog-for-sql-server-data-tools-ssdt?view=sql-server-2017

    "Fix an issue that sometimes variable list of ScriptTask will disappear in task UI".

    Lawrence JM commented  · 

    We have been dealing with this problem intermittently for several years, and recently conducted a thorough investigation of the issue. Here's what we found:

    The problem occurs when:

    - There is a Foreach Loop or For Loop Container,
    - Which contains child Script Tasks,
    - And the user opens the Foreach Loop or For Loop Editor.

    The problem is now triggered; when the user next saves, Visual Studio will fail to write the following properties of each child Script Task to file:

    - ReadOnlyVariables,
    - ReadWriteVariables,
    - Any and all Script Task code.

    The insidious part of the problem is that even though the file on disk no longer contains these properties, *the Visual Studio UI keeps them in memory and will act as if this data still exists*. It is only after the project is closed and reopened will it become apparent that this data has been lost.

    We do not have a solution at this time. However, we have successfully instituted the following workarounds:

    1. Avoid using the Foreach Loop and and For Loop Editors (i.e. where possible, change properties in the Properties panel instead).

    2. If the Editors must be used, then: move all child objects outside of the relevant container; make your changes; save; and then return the child objects back to the container.

    Final note: this problem does not appear to occur with Sequence Containers (which have no Editor interface). It may affect child objects other than Script Tasks - we did not test extensively in this area.

    Additional Resources:

    - https://feedback.azure.com/forums/908035-sql-server/suggestions/32896399-script-tasks-losing-code-in-ssdt-17-1-for-visual-s

    - https://social.msdn.microsoft.com/Forums/sqlserver/en-US/059012f7-180c-43a0-a0b7-3a40b8569a6f/script-task-drops-code-in-ssis-package?forum=ssdt

    Lawrence JM supported this idea  · 

Feedback and Knowledge Base