1

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!

Kevnotec
  • 61
  • 5
  • Make sure that 1. you successfully build your C# script before closing it, and 2. click on 'OK' not the 'x' when you want to close the task. – TheEsnSiavashi Jun 22 '17 at 16:27
  • If you are doing what @TheEsisia suggested already, contact Microsoft and report a bug. Remember: reproducibility is important, but confirming that you did everything correctly is even more important than reproducing the error on demand. – Laughing Vergil Jun 22 '17 at 21:11
  • OK thanks guys. I'll report it as a bug - just as soon as Microsoft's Connect website is working. Oh, the irony! – Kevnotec Jun 23 '17 at 09:08
  • Did you get this problem resolved? I am facing the exact same problem at the moment. – Rasmus Remmer Bielidt Oct 03 '17 at 06:19
  • According to the SSDT changelog, Microsoft have addressed this in Visual Studio 2017 v15.7.0. "Fix an issue that script task code will be lost if it's in a container when targeting SQL Server 2016." I've not had the opportunity to confirm this though, nor whether it has been fixed in Visual Studio 2015. – Kevnotec Jan 31 '19 at 16:20

0 Answers0