VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

Latest post 01-25-2010 4:10 AM by Mayank Goyal. 5 replies.
  • 09-04-2009 5:29 AM

    VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

    Hi Guys,

    We are facing certains issues with installation of our product using VSTA at various locations when the client has already installed version of Visual Studio 2008 (TS/Professional) or Visual Studio 2008 Shell.

    1. After installation the VSTA calls for _dte = (DTE)provider.GetDTE("AppName", 0); would fail with following error

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

      at VSTADTEProvider.Interop.VSTADTEProviderClass.GetDTE(String bstrHostID, UInt32 dwTimeout)

      This seems to have been caused by improper registeration of VSTADTEProvider.dll (located in C:\Program Files\Common Files\Microsoft Shared\VSTA\9.0\x86\VSTADTEProvider.dll for Win XP 32-bit). An manual registration is needed to fix this issue.

    2. The UI for Visual Studio 2008 would change to match that of the VSTA, meaning we would get only one watch window, option to change build configuration, attach to process,  etc. We would have to do an devenv /ResetSettings to restore settings and then reload my CurrentSettings.vssettings to get around it. This happens at all our development machines and we can live with it. But for our clients it is becoming a serious problem.

    I hope you guys can replicate either of the two issues, if you need any help with replication then please do let me know.

    Regards

    Mayank

     

    Regards

    Mayank Goyal

  • 09-08-2009 11:16 AM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 361

    Re: VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

    Mayank,

    I will take a look at this for you. 

    >1)  After installation the VSTA calls for _dte = (DTE)provider.GetDTE("AppName", 0); would fail with following error

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

    >at VSTADTEProvider.Interop.VSTADTEProviderClass.GetDTE(String bstrHostID, UInt32 dwTimeout)

    >This seems to have been caused by improper registeration of VSTADTEProvider.dll (located in C:\Program Files\Common Files\Microsoft Shared\VSTA\9.0\x86\VSTADTEProvider.dll for Win XP 32-bit). An manual registration is needed to fix this issue.

     

    We've seen a similar issue when Visual Studio 2005 / VSTA 2005 is installed, are these present on the machines which are encountering this error?

    2)  The UI for Visual Studio 2008 would change to match that of the VSTA, meaning we would get only one watch window, option to change build configuration, attach to process,  etc. We would have to do an devenv /ResetSettings to restore settings and then reload my CurrentSettings.vssettings to get around it. This happens at all our development machines and we can live with it. But for our clients it is becoming a serious problem.


     

    This is a new one.  Can you confirm that VS 2008/.Net 3.5 SP 1 was installed on the machines that are having these issues prior to the installation of VSTA?  Are you doing anything special for the VSTA settings or just using the default (http://msdn.microsoft.com/en-us/library/cc176071.aspx)?

     

    Thanks,

    -Melody

  • 09-08-2009 12:32 PM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 361

    Re: VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

    Mayank,

    >After installation the VSTA calls for _dte = (DTE)provider.GetDTE("AppName", 0); would fail with following error

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

    I was unable to reproduce your error on a clean XP machine with VS 08, SP1, and VSTA 2.0 re-distributable (not SDK) by running the ShapeAppMacroRecordingCSharp SDK sample.  After properly registering this sample (using the included setup file) I was able to get this error only after removing the required VSTA context and configuration registry hives.  Can you confirm that the host is properly registered?  MSDN:  Registering the Host Application.

    To do this:

    1)  Complete the host configuration hive.

    2)  Delete the the host context hive if present.

    3)  Run VSTA setup for the host.

    If you are still having this error please post your entire configuration hive.


    Thanks,

    -Melody

  • 01-18-2010 4:39 AM In reply to

    Re: VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

    Hi Melody,

    Sorry, I was also unable to reproduce the problem with Visual Studio till today, Currently I have a visual studio with default UI set that to match that of VSTA, like missing menu items for Watch 2, 3  & 4, build configuration default set to "Release" the UI for changing is also missing, but I can add these manually. See the screenshot.


    Visual Studio

    This happened shortly after vsta.exe was run from the command prompt and it displayed a please wait while vsta confirm itself for first run. Which was not true.

    When you mentioned the registry hive I think you must have meant it to be of "VSTAHostConfig" 

    I currently do have VS 2008 (SP1) , VS 2003 (SP1) and SQL Express 2008 (SP1) installed.

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\CombBuilder]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\CombBuilder\2.0]
    "VSCSProjectTemplatesLocation"="D:\\Program Files\\Beehive Systems Ltd\\2009\\Wasp' 3D CombBuilder\\Templates\\CSharp"
    "VSVBProjectTemplatesLocation"="D:\\Program Files\\Beehive Systems Ltd\\2009\\Wasp' 3D CombBuilder\\Templates\\VisualBasic"
    "ProjectTemplatesLocation"="D:\\Program Files\\Beehive Systems Ltd\\2009\\Wasp' 3D CombBuilder\\Templates"
    "AppName"="CombBuilder"
    "VSTAVersion"="9.0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\CombBuilder\2.0\VSTA]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\CombBuilder\2.0\VSTA\InProcHost]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\CombBuilder\2.0\VSTA\InProcHost\{4A11F452-961F-4de9-9B80-019DABE5C56D}]
    "FullClassName"="BeeSys.Wasp3D.CombBuilder.StateManagement.CombBuilderStateManagement"
    "Assembly"="BeeSys.Wasp3D.CombBuilder.StateManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f99f31d5dc9aca3"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\SSIS_ScriptComponent]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\SSIS_ScriptComponent\2.0]
    "AppName"="Integration Services Script Component"
    "VSTAVersion"="9.0"
    "ProjectTemplatesLocation"="d:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Templates\\ssis\\scripting\\component\\"
    "VSCSProjectTemplatesLocation"="d:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Templates\\ssis\\scripting\\component\\CSharp\\"
    "VSVBProjectTemplatesLocation"="d:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Templates\\ssis\\scripting\\component\\VisualBasic\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\SSIS_ScriptTask]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\SSIS_ScriptTask\2.0]
    "AppName"="Integration Services Script Task"
    "VSTAVersion"="9.0"
    "ProjectTemplatesLocation"="d:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Templates\\ssis\\scripting\\task\\"
    "VSCSProjectTemplatesLocation"="d:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Templates\\ssis\\scripting\\task\\CSharp\\"
    "VSVBProjectTemplatesLocation"="d:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Templates\\ssis\\scripting\\task\\VisualBasic\\"

    Let me know if you need the Visual Studio 2008 registry hive as well.

    Regards

    Mayank Goyal

  • 01-20-2010 2:23 PM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 361

    Re: VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

    Mayank,

    Sorry to hear that this issue has reappeared.  Thanks for the registry entries from the host configuration hive (VSTAHostConfig\CombBuilder). 

    >VSTA calls for _dte = (DTE)provider.GetDTE("AppName", 0); would fail with following error:
    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

    Are you still getting this error? 
    I can reproduce this error by deleting the host context hive (VSTAHost\CombBuilder).  Could you ensure that the host is properly registered?  To do this leave your vsta host configuration registry setting as shown in your post, delete the existing context hive for you host (VSTAHost\CombBuilder- do not delete the entire VSTA context hive), then run vsta setup for the host- from a Visual Studio 2008 command prompt enter "vsta /hostid CombBuilder /setup".  Give the setup command a few minutes to finish running then try to display the IDE again.

    >it displayed a please wait while vsta confirm itself for first run. Which was not true.
    Missing registry entries can cause this message to be displayed.  To repro this delete the VSTA host context hive for the current user (HKEY_CURRENT_USER\Software\Microsoft\VSTAHost\ShapeAppCSharp) then run VSTA for the host.  I believe that following the above instructions to repopulate your host context hive will solve this issue.

    >I was also unable to reproduce the problem with Visual Studio till today
    To be sure I understand, are you refering to the Visual Studio settings changing to match the VSTA settings or the error from the GetDTE("hostID",0) call?

    Thanks,
    -Melody

  • 01-25-2010 4:10 AM In reply to

    Re: VSTADTEProvider & Issues with Visual Studio 2008/Visual Studio Shell

    Hi Melody,

    Yes, Visual Studio 2008 settings are changed by VSTA reconfiguration to match the UI like that of VSTA. Which includes the following items being missing

    1) Attach to process

    2) Multiple watch windows disappear

    3) Threads view disappear

    4) Save solution/project dialog like the VSTA appears in case a save is required

    5) Combo's to change the active configuration disappear with default set to Release Build.

     and there are many more, but usually I can add back these buttons manually or just do a devenv /ResetSettings command, but it is annoying and I lose my VS settings.

     

    Regarding the VSTADTEProvider, it does not happen on a working machine and does not require a "vsta /hostid CombBuilder /setup" just a "regsvr32 VSTADTEProvider.dll" which is located in "C:\Program Files\Common Files\microsoft shared\VSTA\9.0\x86" folder. After which the application works just fine.

     

    Regards

    Mayank Goyal

Page 1 of 1 (6 items) | RSS
Copyright Summit Software Company, 2008. All rights reserved.