SSIS Script task disappearing code

  • We have an SSIS 2016 package developed in VS 2017, that includes a C# script task. Occasionally for no apparent reason the code inside the script just disappears completely, replaced by the default comments. I have seen a number of other instances of this behaviour going back to VS 2014 reported online, but no definitive cause or solution.

    I wonder if anyone else has seen/experienced this and what you were able to find out about a cause/soluton.
    Thanks

    Tim

  • slimchance99 - Thursday, January 18, 2018 11:20 AM

    We have an SSIS 2016 package developed in VS 2017, that includes a C# script task. Occasionally for no apparent reason the code inside the script just disappears completely, replaced by the default comments. I have seen a number of other instances of this behaviour going back to VS 2014 reported online, but no definitive cause or solution.

    I wonder if anyone else has seen/experienced this and what you were able to find out about a cause/soluton.
    Thanks

    Yes, seen it and no, did not determine the cause. From memory, the ones with problems were always the more complex ones.
    But I am so glad that we have source control in place so that we didn't lose anything important.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin - Thursday, January 18, 2018 11:38 AM

    slimchance99 - Thursday, January 18, 2018 11:20 AM

    We have an SSIS 2016 package developed in VS 2017, that includes a C# script task. Occasionally for no apparent reason the code inside the script just disappears completely, replaced by the default comments. I have seen a number of other instances of this behaviour going back to VS 2014 reported online, but no definitive cause or solution.

    I wonder if anyone else has seen/experienced this and what you were able to find out about a cause/soluton.
    Thanks

    Yes, seen it and no, did not determine the cause. From memory, the ones with problems were always the more complex ones.
    But I am so glad that we have source control in place so that we didn't lose anything important.

    Thanks. That seems to be the consensus response. I too have been relying on source control to copy/paste the task from. Thinking about putting it in a separate package and never opening to edit and just calling it from an execute package task within the control flow.

    Tim

  • I've experienced a similar thing in VS2015 when opening packages originally created/modified in VS2013. Its complicated a bit by our using the PragmaticWorks BIxPress monitoring and auditing frameworks. However, once I re-create the script task, it seems to stick around. However, I do get the occasional empty screen, or partially read script when editing AND it hangs VSTA. My cure has been to use task manager to delete the VSTA task, then hit the edit script button again. So far, I've found no permanent solution, and PragmaticWorks has been unable to recreate the issue, so I'm happy? to hear I'm not the only one having an issue like this. Misery loves company, I guess.

    Luther

  • latkinson - Friday, January 26, 2018 6:54 AM

    I've experienced a similar thing in VS2015 when opening packages originally created/modified in VS2013. Its complicated a bit by our using the PragmaticWorks BIxPress monitoring and auditing frameworks. However, once I re-create the script task, it seems to stick around. However, I do get the occasional empty screen, or partially read script when editing AND it hangs VSTA. My cure has been to use task manager to delete the VSTA task, then hit the edit script button again. So far, I've found no permanent solution, and PragmaticWorks has been unable to recreate the issue, so I'm happy? to hear I'm not the only one having an issue like this. Misery loves company, I guess.

    Luther

    We're not alone Luther. Of all the mentions of this I found online, not a single one found a definitive solution. We use Pragmatic Works Task Factory, but no BIxPress auditing hasbeen added to this project yet. It seems hit or miss - it'll be fine for days/weeks then one day poof! Gone. We've just been pasting in the script task from a previously checked in version when this happens, but I'll try your task manager trick.

    Thanks
    Tim

    Tim

  • I have noticed that the problem occurs more often
    a) the script task is written in VB
    b) the script task has additional imports of libraries.
    c) web service references are involved.

    I seem to have fewer occurrences when the script task is written in C#.

  • latkinson - Monday, January 29, 2018 7:26 AM

    I have noticed that the problem occurs more often
    a) the script task is written in VB
    b) the script task has additional imports of libraries.
    c) web service references are involved.

    I seem to have fewer occurrences when the script task is written in C#.

    We use C# exclusively.

    Tim

  • I'll admit, I've noticed this before as well before. We use c# and VB.net here, and I've noticed it in both.

    Much like Phil, however, everything we have is in Source Control, so if it does happen, we can easily get the code back. I imagine it's one of the "features".

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Please up-vote this issue on Microsoft VS Community portal:
    https://developercommunity.visualstudio.com/content/problem/199587/ssis-script-task-losing-code.html

  • Thom A - Monday, January 29, 2018 8:22 AM

    I'll admit, I've noticed this before as well before. We use c# and VB.net here, and I've noticed it in both.

    Much like Phil, however, everything we have is in Source Control, so if it does happen, we can easily get the code back. I imagine it's one of the "features".

    One thing I've always noted is that any time you change the code in there, even if it's just white space, you lose the changes if you don't do a build.   Not sure if that's in any way related, but thought I'd at least mention it...

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply