Link to home
Start Free TrialLog in
Avatar of neehar gollapudi
neehar gollapudiFlag for United States of America

asked on

SSIS Script component error

I created the script component and when I tried to reopen it after couple of days I get the below error. See attachment. Is there any other setting that I am missing.  I also found that the ScriptMain.vb file is pointing to a temp directory. Any suggestion.
6-23-2017-4-38-45-PM.png
Avatar of HainKurt
HainKurt
Flag of Canada image

I found this

@rem start batch file
@rem delete the VSTA registry cache from the current user
REG DELETE HKCU\Software\Microsoft\VSTA /f
REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
REG DELETE HKCU\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f

@rem delete the VSTA registration cache for SSIS script task and data flow script component
REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptTask /f
REG DELETE HKLM\Software\Microsoft\VSTAHost\SSIS_ScriptComponent /f

@rem delete the cached files from the HDD
rd /s /q "%AppData%\Microsoft\VSTA"
rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptTask"
rd /s /q "%AppData%\Microsoft\VSTAHost\SSIS_ScriptComponent"

rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTA"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptTask"
rd /s /q "%USERPROFILE%\Local Settings\Application Data\VSTAHost\SSIS_ScriptComponent"

@rem re-generate the VSTA files for SSIS script task and component
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptTask /setup
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vsta.exe" /hostid SSIS_ScriptComponent /setup

Open in new window


https://social.technet.microsoft.com/Forums/lync/en-US/e5337b0c-7f70-4603-859e-fbc7d0cf1c37/cannot-show-visual-studio-tools-for-application-editor?forum=sqlintegrationservices

you can try it step by step if you wish...
I used to encounter something like this from time to time in older versions (they weren't old at the time). It could be triggered by supposedly unrelated uninstalls or installs, I think, or maybe by the phase of the moon. It hasn't happened to me for a good many years now, and I no longer remember exactly how I used to fix it, but it was with an uninstall and reinstall of something, probably SQL Server Client Tools or BIDS or whatever contained VSTA itself. I didn't need to manually do anything else.
Avatar of Nakul Vachhrajani
I agree - in those couple of days between the time you created the script and are trying to edit it, what happened? Was anything uninstalled? You can try repairing VSTA from the original SQL Server disk/installation media (https://nakulvachhrajani.com/2016/02/01/0372-sql-server-ssis-vsta-could-not-load-file-or-assembly-microsoft-visualstudio-tools-applications-core/).

By the way, it's okay for the ScriptMain.vb file to point to a local directory. When you save the script and ultimately the script component, the whole thing gets embedded into your SSIS package file.
Avatar of neehar gollapudi

ASKER

nope nothing changed . I will try repairing the VSTA
repair didn't work.
If you perform a repair as opposed to an uninstall and reinstall, that might not fix it. It's also important to reinstall the right option(s). I think it was either BIDS or SQL Server Management Tools or both, but it was a long time ago.

I came across one post that said to uninstall and reinstall SQL Server. That seems like overkill.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.