none
Can not start Visual Studio 2010 RRS feed

  • Question

  • My VSPackage was written in VS2005 and VsSDKFebruary2007. System.InvalidOperationException error occur and VS can not start when my package run on VS2010 with the following steps:

    1. Start VS2010
    2. Open my ToolWindow
    3. Close VS2010 without closing my ToolWindow
    4. Start VS2010 then error occur.

    log:

    System.InvalidOperationException: The DocumentSite on a WindowFrame may only be set once
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.set_DocumentSite(DocumentObjectSite value)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(String pszName, Int32 fDockViewOn, Int32 fDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, UInt32 dwToolWinId, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Int32& pfDefaultPosition, Guid& rguidCmdUI, IVsWindowFrame& ppWindowFrame)
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
       at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
       at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool)
       at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id)
       at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool)

    Friday, September 9, 2011 9:17 AM

All replies

  • A stand-alone repro is most helpful for timely investigation.

    Ryan

    Friday, September 9, 2011 3:24 PM
    Moderator
  • Hello,

    If you rebuild your package using VS2010 and VS2010 SDK, does it resolve your issue?

     

    If not, could you show us some code of your package to help investigating the problem?

     

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, September 12, 2011 6:58 AM
    Moderator
  • "No Visual Studio registration attribute found in this assembly." error occur when building my project on VS2010 and VS2010 SDK.
    Monday, September 12, 2011 9:51 AM
  • This can happen when moving a package created with a previous version of the SDK.  Can you try to add a reference to Microsoft.VisualStudio.Shell.10.0 to your package?

     

     


    Carl Brochu, Visual Studio
    Monday, September 12, 2011 4:33 PM
    Moderator
  • Thanks Carl Brochu.

     

    Tuesday, September 13, 2011 6:20 AM
  • Hello,

    If you rebuild your package using VS2010 and VS2010 SDK, does it resolve your issue?

     

    If not, could you show us some code of your package to help investigating the problem?

     

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    The error also occur when I debug on VS2010 and VS2010 SDK
    Tuesday, September 13, 2011 6:22 AM
  • Is there any method or way to set ToolWindow which does not automatically open when starting VS?
    Wednesday, September 14, 2011 7:37 AM