I am making a small package in SSIS (Integration Services), and in my control flow I have several script tasks and some data streams that read data from XML files into a database.
I made some changes to the C # code in the script job in the built-in Visual Studio editor and clicked save. The star by the file name disappeared, indicating that the file was saved. I closed the Visual Studio editor, saved the package, right-click the script task, and selected Run Task. It worked without errors, but the XML files that it was supposed to create never appeared, so I opened the script again in the Visual Studio editor, and, to my horror, there was only a standard script (for example, only the main method and it contained only the statement Dts.TaskResult = (int)ScriptResults.Success; )!
I was unable to find the code that I had in this script task, and when I open the .dtsx file in a text editor, my code is gone! However, the code is in another script task.
I paid close attention, so I could not mistakenly delete everything before closing the editor and saving the package.
So my question is: has anyone else encountered this absolutely crazy mistake and there is a way to recover the code; or do I just need to bite a bullet and recreate it from memory?
We rarely use any significant amount of C # code in these SSIS jobs, so we donβt have a built-in VCS. I copied the code to a new file and manually added it to my own Git repository to be safe, but I have not done this with this specific code yet.
And I just need to repeat my disappointment with such an amazingly bad mistake in Visual Studio ...
source share