SSIS Script Editor throws an exception

我的未来我决定 提交于 2019-12-12 13:23:56

问题


I have SQL Server 2012, SSIS, SSDT and Visual Studio 2010. I can create a new SSIS package and add a Script Task, but if I attempt to open the Script Editor for that Script Task I get the following error:

TITLE: Microsoft Visual Studio
------------------------------

Cannot show Visual Studio 2010 Tools for Applications editor.

------------------------------
ADDITIONAL INFORMATION:

Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (mscorlib)

------------------------------
BUTTONS:

OK
------------------------------

From my own investigation into this error, I found that Visual Studio Tools for Applications appears to be a part of MS Office 2007 and higher. This seemed like an odd dependency for to have, but I installed MS Office 2010 just for grins. It didn't change anything. What else should I try?


回答1:


You will also get this error, if you are trying to debug a script task in VS 2010 and Run64BitRuntime is set to true. In order to debug, set it to false.




回答2:


I was getting this error and nothing I came across corrected the problem until I logged off as my normal user and logged in as my local admin user. Once I logged in as an admin I could edit the script in my package. Once I logged back in as my regular user the edit script button worked for it too.

I assume it needed to register the assembly on the first launch and couldn't with my regular domain user.




回答3:


I also got this same error when trying to open the Script Editor, but for a different reason. Not sure how it happened, but I had 3 copies of VSTA (different versions) installed. Once I removed all of them and re-installed SQL Server 2012, problem solved. Hope that helps.




回答4:


For me the solution was:

  • close bids (I'm on 2008r2)
  • reopen
  • edit the script (it allowed me to edit it once after restarting bids)
  • delete all breakpoints
  • make a trivial change, such as adding a blank line
  • save

That solved it for me.




回答5:


This worked for me without doing any kind uninstall.

My environment: Microsoft Visual Studio 9.0 (2008)

Solution:

  1. Go to cd "C:\program files (x86)\microsoft visual studio 9.0\common7\ide\"

  2. Execute command vsta.exe /setup /hostid SSIS_ScriptTask. This will open VSTA with blank project. Let it open and then close it.

  3. Execute command vsta.exe /setup /hostid SSIS_ScriptComponent. This will open VSTA with blank project. Let it open and then close it.

  4. Open your solution/packages that contains the script task.

  5. Click Edit button in Script task and it should open now. Just in case if it dont, I would suggest to keep the blank vsta of step 2 & 3 open and then click the Edit button in script task.

Took almost two hours and thankfully it worked for me. I did not have admin right to perform all that nasty uninstall and registry edit solutions.

Hope it helps someone!!!

Reference : http://blogs.msdn.com/b/jason_howell/archive/2010/08/18/vsta-setup-and-configuration-troubles-for-ssis-2008-and-r2-installations.aspx




回答6:


Cannot show Visual Studio 2010 Tools for Applications editor.

Just follow the below solution:

  1. Go to SQL Server Setup folder.
  2. Inside that folder "redist".
  3. Under that one more folder "VSTA".
  4. Under VSTA folder "X86" and "X64"
  5. Install the VSTA_RT30.
  6. It works fine.



回答7:


I figured out my problem this morning. When I uninstalled SQL Server 2012 (and the remnants of 2008 left behind when I upgraded last month) I also uninstalled 3 packages that were actually part of Visual Studio 2010. Had I not done this, a reinstallation of SQL Server 2012 would probably have done the trick, but instead I found new errors. When I reinstalled these 3 packages from the Visual Studio 2010 distribution media, everything started working.

The 3 packages in question were:

  • Microsoft SQL Server 2008 R2 Data-tier Application Project
  • Microsoft SQL Server 2008 R2 Data-tier Application Framework
  • Microsoft SQL Server 2008 R2 Transact-SQL Language Service


来源:https://stackoverflow.com/questions/10433791/ssis-script-editor-throws-an-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!