Cannot show Visual Studio 2008 Tools for Applications editor. (Microsoft Visual Studio)

If you are having trouble launching VSTA (Visual Studio Team Applications) while trying to edit a script task.

 

Errors that can be reported:

“Registration information for this application needs to be updated…”

”Cannot show Visual Studio 2008 Tools for Applications editor. “

“System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. ”

SSIS_errorLoadingContext1

 

Background Information:

SSIS 2008 uses VSTA 2.0 to edit scripts and all components must be installed correctly.  When you edit script tasks or components in SSIS. This is the executable that is invoked when “Edit Script” is pressed.  The vsta.exe executable then is passed an ID from the package and opens the code.  We will troubleshoot vsta.exe directly for this error.

vsta.exe is shared by multiple Microsoft products including MS office and SQL server for SSIS as well as others.

 

The vsta.exe executable:

The first argument for vsta.exe is usually a project file or the /HostID switch. Details on this executable can be found at the end of the article.

The msiexec executable:

The first argument for msiexe is an I for install or U for uninstall.  Details on this executable can be found at the end of the article.

 

Basic troubleshooting:

Open up Command Prompt and change the working directory to the ide folder your version of SQL.

MS SQL Server 2008:

cd “C:program files (x86)microsoft visual studio 9.0common7ide”

Testing:

RUN:    vsta.exe /hostid SSIS_ScriptTask
RUN:    vsta.exe /hostid SSIS_ScriptComponent

 

image

If you DO NOT receive the “unable to load context” error VSTA.exe is installed properly.
*note please test both the script task and the script component.

MS SQL Server 2008R2:

cd “C:program files (x86)microsoft visual studio 9.0common7ide”

Testing:

RUN:     vsta.exe /hostid SSIS_ST110
RUN:     vsta.exe /hostid SSIS_SC110
image

 

Answer – locate the trin_aide.msi file for your version of SQL Server and reinstall.

Reinstall VSTA from the SQL 2008 Media:

RUN:  msiexec /i trin_aide.msi

 

image

image

Re-run your tests.

image

It should come up now:

 

image

 

If you still receive the errors mentioned above you will may have to do one of the following:

1. repair your installation.

image

 

image

 

image

image

 

image

 

image

 

Continue this process and reinstall the shared components…

 

–If this does not work, you may need to  Reinstall SQL server 2008 or Call Microsoft Product Support.

 

Please share and rate this article, thank you

 

 


Example command line:

vsta.exe /HostID ShapeAppMFC /Setup

Available command line switches:

/HostID  – Specifies the host identifier for which Visual Studio Tools for Applications will load a customized environment.

/Setup -Extracts the project templates for the host application and initializes the host-specific
environment for the current user. This switch requires administrator privileges.
/Edit               Opens the specified files in a running instance of this application. If there are no
running instances, it willstart a new instance with a simplified window layout.

/Log                Logs IDE activity to the specified file for troubleshooting.

/ResetSettings    Restores the IDE’s default settings, optionally resets to the specified VSSettings file.
Product-specific switches:

 

The msiexec executable:

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install – Installs a product on the network
/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
Advertises a product – m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode – progress bar only
/q[n|b|r|f]
Sets user interface level
n – No UI
b – Basic UI
r – Reduced UI
f – Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
i – Status messages
w – Nonfatal warnings
e – All error messages
a – Start up of actions
r – Action-specific records
u – User requests
c – Initial UI parameters
m – Out-of-memory or fatal exit information
o – Out-of-disk-space messages
p – Terminal properties
v – Verbose output
x – Extra debugging information
+ – Append to existing log file
! – Flush each line to the log
* – Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
Update Options
/update <Update1.msp>[;Update2.msp]
Applies update(s)
/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p – only if file is missing
o – if file is missing or an older version is installed (default)
e – if file is missing or an equal or older version is installed
d – if file is missing or a different version is installed
c – if file is missing or checksum does not match the calculated value
a – forces all files to be reinstalled
u – all required user-specific registry entries (default)
m – all required computer-specific registry entries (default)
s – all existing shortcuts (default)
v – runs from source and recaches local package
Setting Public Properties
[PROPERTY=PropertyValue]

1 Comment for “Cannot show Visual Studio 2008 Tools for Applications editor. (Microsoft Visual Studio)”

says:

It might be helpful to radrees to clarify that custom event handlers are independent of the out-of-the-box logging. Perhaps provide examples of common actions to perform in the event handlers e.g. in the OnError event, you can access the event scoped System variables SourceName and the GUID of the failing container (ScopeID). Thanks for blogging, looks like I have a few year’s worth of posts to catch up on.

Leave a Reply