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 3.
<=-=Aug 14 2017 10:15PM=-=>
I have the same problem. Code and Variables disappear on the second execution of the script. Need a solution real fast!
<=-=Aug 17 2017 7:30AM=-=>
I tought I was going crazy. This is hapenning to me too. I did the following. Build -> Rebuild -> Run Code Analysis -> Save -> Build -> Save all and then closed, and click on OK on the editor, but when deploying the packages weren’t working. When I reimported the packages the VB script task had lost all code and variables, and was set to C#.
I am deploying to SQL 2016. Select @@Version:
Microsoft SQL Server 2016 (SP1-CU3) (KB4019916) – 13.0.4435.0 (X64) Apr 27 2017 17:36:12 Copyright © Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)
Here is the dump from Help:
Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Professional
LightSwitch for Visual Studio 2015 00325-60003-66538-AA356
Microsoft LightSwitch for Visual Studio 2015
Microsoft Visual Studio Tools for Applications 2015 00325-60003-66538-AA356
Microsoft Visual Studio Tools for Applications 2015
Visual Basic 2015 00325-60003-66538-AA356
Microsoft Visual Basic 2015
Visual C# 2015 00325-60003-66538-AA356
Microsoft Visual C# 2015
Visual C++ 2015 00325-60003-66538-AA356
Microsoft Visual C++ 2015
Application Insights Tools for Visual Studio Package 7.0.20622.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
JavaScript Language Service 2.0
JavaScript Language Service
JavaScript Project System 2.0
JavaScript Project System
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
NuGet Package Manager 3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Office Developer Tools for Visual Studio 2015 ENU 14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Analysis Services 13.0.1701.8
Microsoft SQL Server Analysis Services Designer
Version 13.0.1701.8
SQL Server Data Tools 14.0.61021.0
Microsoft SQL Server Data Tools
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5
SQL Server Reporting Services 13.0.1701.8
Microsoft SQL Server Reporting Services Designers
Version 13.0.1701.8
TypeScript 1.8.36.0
TypeScript tools for Visual Studio
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
<=-=Aug 23 2017 10:28AM=-=>
I have wasted over 14 hours with this critical bug. The losing code in the Script Task within Visual Studio 2015 is one of the issues but I first had a similar issue when deploying the SSIS packages with script tasks. After deploying the packages the SSIS will run and succeed but the script task won’t do anything since the code is gone! During deployment it will strip the code from the Script Task but you’ll still have it locally. I have reproduce losing the code locally in the script task twice. You will know when you are about to lose all the script task code once Visual Studio will not hit break points within the code. Soon as you close Visual Studio the code is gone!
It took me hours to figure that out and I can’t believe Microsoft is working on SQL Server 2017 and this is not even solved in 2016! This is a major bug and no response from Microsoft since the issue was posted 2 months ago. I first thought I was doing something wrong but it is definitely a major software bug.
<=-=Aug 24 2017 4:11PM=-=>
We also are seeing this issue on multiple systems.
We have seen this issue in 17.1, 17.2, and now 17.3…
We just upgraded to 17.3 hoping it would solve the issue – it seems to be worse now.
<=-=Sep 5 2017 8:36AM=-=>
At least three SSIS developers at our company are having the same issue, code within Script tasks is just randomly disappearing and we have to pull code from a previous version or rewrite. We are uninstalling v17.0 and going back to v16.5 of SSDT
<=-=Sep 6 2017 11:40PM=-=>
We are also facing the exact same issue. This is becoming a serious problem as we are always at risk editing an SSIS package running in production. To mitigate this risk we are forced to take a backup of the code file every-time we edit an ETL. Request you to fix this issue asap.
<=-=Sep 20 2017 1:14PM=-=>
Same issue here. It seems to be random on how it occurs, but once a script task has this happen, it seems to happen to that same task over and over again. We have one package in particular that has multiple script tasks in it and this one task keeps getting lost. We keep the code for that task in notepad files on all of our dev machines so that when it gets lost we can put it back quickly. It’s unfortunate because that task doesn’t get any changes to it. We just expect it to work but when we deploy and the code is gone, we end up not sending any files to our partners / clients. It doesn’t make us look very good when that fails…
<=-=Oct 17 2017 2:14AM=-=>
Same issue, C# tasks migrated OK .VB is blank.
It is almost 4 months since issue opened .
Should I wait for a fix or start rewriting code or better, find stable ETL tool?
<=-=Oct 24 2017 9:37AM=-=>
Same issue. VB code disappearing.
Come on Microsoft. Fix this!!!!
<=-=Nov 17 2017 3:41AM=-=>
I’m also experiencing this bug. Since installing the latest version of SSDT for VS 2015, it hasn’t been as prolific, but it’s still happening inconsistently.
I’ve had to start duplicating my code changes to a text file every time I make a change, so I’ve got a quick backup for when the inevitable happens!
<=-=Nov 27 2017 11:48PM=-=>
I had this issue as well. seems to appear after installing new SSMS 17.3
The thing is that even when I tried to open previous versions that surly has the code inside, the task code becomes the initial page without my code.
To get the code back I edited (by notepad++) one of my previous versions of dtsx file and copy/paste it from there.
I must say it is very annoying and hope to have a fix as soon as possible.
I think it started right after installing SSMS 17.3 which also installed MS System CLR Types for SQL server 2017 and SSDT Application Framework (14.0.1000.169)
<=-=Nov 30 2017 11:00AM=-=>
Thank you for deleting my morning’s work, Microsoft.
Your silence on this issue is deafening.
With help like this, who needs malware?
<=-=Dec 17 2017 7:27AM=-=>
This is a serious problem. I am unable to save any script code. The work arounds suggested are laughable. I’ve tried saving the C# code in a text file, deleting the script task, dropping in a new script task and pasting the C# code back in. I save it and try to immediately execute it with a breakpoint set in the C#. It never hits the breakpoint because the code is gone. It looks like the code is there and it says it ran successfully but never hits the breakpoint on the first executable line of code. If I close the .dtsx file and reopen it, the code is gone. I tried dropping in Cozyroc’s Script Task Plus but the same thing happens.
This same behavior occurs in SSDT for VS 2015 and SSDT for VS 2017. This is my company’s first attempt to use SQL Server 2016 and if this isn’t resolved, it is unusable and I will have to recommend using another product. We’re about to go to the cloud (AWS) and management would really prefer that we convert to MySQL or Postgres anyway since it’s much cheaper. Your move Microsoft and I suggest you respond in some way within the next week as we need to support a new customer on January 1.
Having the problem now in VS2019 - had this problem not in VS2015 or 2017.
I think the installation could be corrupted with no reason - i tried to reinstall ssdt from the extensions menu but it did't help.
This cost me some hours of work until now and i can't find any sollution because there is no error-message and i am loosing code i wrote with no warning.