I have an SSIS package with a number of For Each ADO Loops, each with a single script task, which are usually working fine.
However, every so often, the script task will suddenly 'forget' all the code in task. I'm presented with an empty task editor which has reset to C# (if using VB), and lost the ReadOnlyVariable names. If I click Edit Script, I get a brand new script created in the editor. This occurs intermittently on reopening the package, or after editing a different script task. The same thing also occurs with both VB and C# scripts, in 32 or 64 bit mode.
I've used SSIS 2008 & 2012 for years, yet it's only SSIS 2016 I've experienced anything like this! Can think of no way of mitigating this or working around it (other than using 2012).
I'm on that latest Visual Studio 14.0.23107.0 D14REL, with .NET Version 4.6.01055. TargetServerVersion is SQL Server 2016. Has anyone else experienced this before? I'm coming to the opinion that it's a bug in Visual Studio 2015, but the project deadline won't allow me to wait for Microsoft!