3

I'm working on an SSIS package in Visual Studio 2013. For any script component throughout the package, if I double-click on it and then click the "Edit Script..." button, Visual Studio 2012 opens but no editor window loads. It's just an empty window like you closed all documents. The Solution Explorer shows items, but notably "ScriptComponent" is an empty folder:

enter image description here

If I try to open any of the files (BufferWrapper.cs, ComponentWrapper.cs, main.cs) in the Solution Explorer, I get a popup error box saying:

No exports were found that match the constraint: Contract Name Microsoft.VisualStudio.Utilities.IContentTypeRegistryService RequiredTypeIdentity Microsoft.VisualStudio.Utilities.IContentTypeRegistryService.

Anyone have any clue what's going on here? FWIW, I have tried closing all instances of Visual Studio and reopening my solution with the SSIS package. The same behavior persists.

4

I stumbled across this blog post, which while the author didn't have the exact same problem as me, our issues seemed similar enough that his fix might work for me to. I downloaded the SSDT-BI 2012 package and installed it, and lo and behold, things work fine again. I'll just not even consider that somehow things worked fine for a year or more without downloading and installing SSDT-BI 2012, so I might be able to retain some portion of my sanity.

  • 1
    "Oh, that way madness lies" – billinkc Sep 16 '15 at 2:18
  • My issue was not exactly the same, but similar. The script editor would open for just a moment. I would see the code for a second and it would turn off. Maddening!!! Reinstalled as you said took care of it. Thanks! – Catchops May 5 '17 at 18:32
2

I ran into this same problem. The organization I work for has installs and downloads locked down and there is a ton of red tape to getting help desk to install or download something. I have SQL SERVER DATA TOOLS 2015 version 14.0.25420.01 and like you said Script task is opening blank with no editor and my code was gone.

I closed my project, started a new package, created a new script task and opened it. There was the editor. Then I opened a seperate instance of data tools. There I opened my package. Then I copied and pasted the new script task from the new package to the old one. I opened the new script componant and there was the editor.

Then I opened my old script task and the editor was back. This is not a permenant fix but at least I had my code. I dont have time on this project to wait for red tape so this works for me for now. I will just save all of my C# in notepad just in case this happens again and I cant use the same method to fix.

0

I've encounted the same problem as well.

Since no solution until now, I began to write my own code directly in the DTSX file.

If your logic business was not very complex, this solution maybe suitable:

  1. Firstly, add a "Scritp Task" in your package of SSIS project. It will generate lots of code in the DTSX file, and save our work.
  2. Open DTSX file of the package in Notepad++/SublimeText, as your wish, and look for "// TODO: Add your code here", which was in a public void Main().
  3. Fun Coding!

I've uploaded a project of TestScriptTask, in case of making coding easier in visual studio. It needs SQL Server Developer edition installed at least (Express edition probably would not work, didn't test).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.