Code Contracts and VS 11 Beta - 'StanPackage' did not load correctly error

Respondida Code Contracts and VS 11 Beta - 'StanPackage' did not load correctly error

  • יום שישי 30 מרץ 2012 07:10
     
     

    Hi,

    after installing Code Contracts 1.4.50327.0 when opening a solutipon in VS 11 Professional Beta I get the following Visual Studio dialog box:

        'StanPackage' did not load correctly error ...

    ActivityLog.xml contains the following error entry:

    544 ERROR Failed to set up ClassFactory for packageFailed to set up ClassFactory for package
              C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\stanpackage.dll {72391CE3-743A-4A55-8927-4217541F6517} 80040111 VisualStudio 2012/03/30 06:48:18.424

    Opening the Code Analysis properties then sometimes crashes Visual Studio (there was no problem before installing Code Contracts).

    Wilhelm

כל התגובות

  • יום רביעי 04 אפריל 2012 00:42
     
     

    Did you try running "devenv /setup" from a Developer Command prompt?  If that doesn't work, try repairing your VS11 install.

  • יום רביעי 11 אפריל 2012 16:23
     
     

    We'll be looking into this to see if we can determine what's going wrong and get a fix prepared. 

    Thank you very much for providing this feedback.  Very much appreciated.


    Allen Denver - Visual Studio Development

  • יום חמישי 12 אפריל 2012 08:08
     
     

    I tried both "devenv /setup" and "VS11 Repair" - but both did not work.

    I did the installation with the following sequence:

    • Windows 7 64 bit
    • Visual Studio 2010 Professional
    • Code Contracts 1.4.50126.1
    • Visual Studio 11 Professional Beta
    • Visual Studio 11 Repair to get Code Contracts 1.4.50126.1 running
    • Code Contracts 1.4.50327.0

  • יום שישי 13 אפריל 2012 08:17
     
     

    I don't know if this is significant, but I had to run "devenv /setup" from an admin command prompt for it to work without displaying an error.

    Unfortunately, even after that I don't see any Code Contracts tab in project properties.

    • נערך על-ידי Matthew Watson יום שישי 13 אפריל 2012 08:20
    •  
  • יום שני 16 אפריל 2012 09:06
     
     

    Update: This is now working for me.

    I had to uninstall Code Contracts and then reinstall it, and then run "devenv /setup" from an admin devstudio prompt.

  • יום שני 16 אפריל 2012 15:28
     
     

    Wilhelm,

    Can you get the same good behavior as Matthew if you uninstall/reinstall Code Contracts and then run 'devenv /setup' from an elevated VS cmd prompt?


    Allen Denver - Visual Studio Development

  • יום שלישי 17 אפריל 2012 07:13
     
     

    Allen,

    already tried uninstall/reinstall Code Contracts and then 'devenv /setup' without any success.

  • יום רביעי 25 אפריל 2012 13:04
     
     

    The same problem for me. I tried to reinstall code contracts, repair VS, reran devenv /setup with no success

  • יום רביעי 06 יוני 2012 07:51
     
     

    I still get the same message after installing to Visual Studio 2012 Release Candidate

  • יום רביעי 06 יוני 2012 16:09
     
     

    Wilhelm,

    Can you provide detailed repro steps so we can try to repro this ourselves?


    Allen Denver - Visual Studio Development

  • יום שלישי 12 יוני 2012 14:57
     
     

    I tried to reproduce it on a virtual machine - but failed.

    So maybe if one does a clean installation the problem is solved.

  • יום שלישי 12 יוני 2012 20:13
     
     

    We've been trying to reproduce this using various combinations of SKUs and install steps but have been so far unable to reproduce the issue.  If we can get more detailed install steps, that would help to improve the chance we can reproduce this internally.

    Finally, if someone can debug VS (attach to DevEnv.exe just before the point of the crash) and get a call stack or a dumpfile, that would also help tremendously.

    Thanks!


    Allen Denver - Visual Studio Development

  • יום שלישי 12 יוני 2012 20:38
     
     

    How about this? )
    (Sorry about Russian in Message, hope this is not important)

    System.AccessViolationException не обработано
      HResult=-2147467261
      Message=Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена.
      Source=StanPackage
      StackTrace:
           в CPackage.GetServiceProvider(CPackage* )
           в CVSRuleSelectionPage.{ctor}(CVSRuleSelectionPage* , IUnknown* pOuterUnknown, Int32 )
           в TNL.COM.CreateCoClassInstance<class CVSRuleSelectionPage>(IUnknown* pOuterUnknown, _GUID* iid, Void** ppObject)
           в Microsoft.VisualStudio.Shell.Interop.ILocalRegistry.CreateInstance(Guid clsid, Object punkOuter, Guid& riid, UInt32 dwFlags, IntPtr& ppvObj)
           в Microsoft.VisualStudio.Editors.ApplicationDesigner.PropertyPageInfo.TryLoadPropertyPage()
           в Microsoft.VisualStudio.Editors.ApplicationDesigner.ApplicationDesignerView.ShowTab(Int32 Index, Boolean ForceShow)
           в Microsoft.VisualStudio.Editors.ApplicationDesigner.ApplicationDesignerView.OnInitializationComplete()
           в Microsoft.VisualStudio.Editors.ApplicationDesigner.ApplicationDesignerWindowPane.PopulateView(Guid guidLogicalView)
           в Microsoft.VisualStudio.Editors.ApplicationDesigner.ApplicationDesignerWindowPane.ActivateLogicalView(Guid& rguidLogicalView)
           в Microsoft.VisualStudio.Shell.Interop.IVsUIDataSource.Invoke(String verb, Object pvaIn, Object& pvaOut)
           в Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(String verb, Object pvaIn, Object& pvaOut)
           в Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(Object parameter)
           в MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
           в System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
           в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           в System.Windows.Threading.DispatcherOperation.InvokeImpl()
           в System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
           в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           в System.Windows.Threading.DispatcherOperation.Invoke()
           в System.Windows.Threading.Dispatcher.ProcessQueue()
           в System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           в System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
           в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
           в Microsoft.VisualStudio.PlatformUI.NativeMethods.DispatchMessage(MSG& lpmsg)
           в Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.<PushMessageLoopOnContextMenuTrackingComponent>b__69(Object sender, PreTranslateMessageEventArgs args)
           в Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.FPreTranslateMessageCore(MSG[] pMsg)
           в Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.Microsoft.VisualStudio.OLE.Interop.IOleComponent.FPreTranslateMessage(MSG[] pMsg)
           в Microsoft.VisualStudio.OLE.Interop.IOleComponentManager.FPushMessageLoop(UInt32 dwComponentID, UInt32 uReason, IntPtr pvLoopData)
           в Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.PushMessageLoopOnContextMenuTrackingComponent()
           в Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.ExecCommand(UInt32 itemid, Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
           в Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities.<>c__DisplayClass22.<ExecHierParentChain>b__1f()
           в Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(Func`1 method, Boolean reportError)
           в Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities.ExecHierParentChain(IVsHierarchyItemManager manager, IVsUIHierarchy lpUIHCmd, IVsUIHierarchy lpUIHCurrent, UInt32 itemidCurrent, Guid& pguidCmdGroupRef, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
           в Microsoft.VisualStudio.PlatformUI.HierarchyItem.HierarchyContextMenuController.ShowContextMenu(IEnumerable`1 items, Point location)
           в Microsoft.Internal.VisualStudio.PlatformUI.ContextMenuController.ShowContextMenu(IEnumerable`1 items, Point location, Func`2 getController)
           в Microsoft.Internal.VisualStudio.PlatformUI.ContextMenuController.ShowContextMenu(IEnumerable`1 items, Point location)
           в Microsoft.Internal.VisualStudio.PlatformUI.PivotTreeView.OnContextMenuOpening(ContextMenuEventArgs e)
           в System.Windows.FrameworkElement.OnContextMenuOpeningThunk(Object sender, ContextMenuEventArgs e)
           в System.Windows.Controls.ContextMenuEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
           в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
           в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
           в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
           в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
           в System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
           в System.Windows.ContentElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
           в System.Windows.Controls.PopupControlService.RaiseContextMenuOpeningEvent(IInputElement source, Double x, Double y, Boolean userInitiated)
           в System.Windows.Controls.PopupControlService.ProcessMouseUp(Object sender, MouseButtonEventArgs e)
           в System.Windows.Controls.PopupControlService.OnPostProcessInput(Object sender, ProcessInputEventArgs e)
           в System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
           в System.Windows.Input.InputManager.ProcessStagingArea()
           в System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
           в System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
           в System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
           в System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           в System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           в System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
           в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
      InnerException:

  • יום שלישי 12 יוני 2012 20:47
     
     

    Maxim, what build of VS are you using?  Does the problem go away if you first open the Code Analysis Results tool window (using the command from the View / Other Windows / Code Analysis menu)?

    Thanks,


    Allen Denver - Visual Studio Development

  • יום שלישי 12 יוני 2012 21:03
     
     
    Yes! It works! Thank you
  • יום שלישי 12 יוני 2012 21:20
     
     

    Glad it works, but can you tell me what version of VS you are having this problem with?  We fixed this after the Beta release so I don't expect it to occur in later releases.

    Thanks!


    Allen Denver - Visual Studio Development

  • יום שלישי 12 יוני 2012 21:26
     
     
    Version 11.0.50522.1 RCREL
  • יום שישי 20 יולי 2012 09:34
     
     

    Opening the Code Analysis window did not worked for me

    Version 11.0.50706..0.QRELRC July 2012


    • נערך על-ידי Boucmed יום שישי 20 יולי 2012 09:35
    •  
  • יום שני 23 יולי 2012 05:33
     
     

    I've got the same error showing with 11.0.50706.0 QRELRC July 2012. Opening the CA window does not help.

    At first, I was not able to get the CC tab to VS2012 (the error did not show then), but today I've made it work and the error started to appear.

    I have VS2010 and VS2012 RC installed side-by-side.

  • יום חמישי 23 אוגוסט 2012 11:56
     
     
    The issue is present in VS 2012 RTM Ultimate also.
  • יום חמישי 23 אוגוסט 2012 19:35
     
     

    On my system:

    Clean install of Windows 8 Pro

    - Installed Visual Studio 2010 Ultimate + SP1 + all MS updates

    - Installed Visual Studio 2012 Ultimate

    - Installed Code Contract 1.4.50813.1

    - Executed devenv.exe/setup from a VS 2012 command prompt with admin rights.

    Code Contracts tab is visible and didn't see the "stan-package" problem. With VS 2012RC and previous version of CC I also got "stan-package" warning on my dev system at home and work.

  • יום חמישי 30 אוגוסט 2012 08:28
     
     
    Interesting, since my work machine had got a VS 2012 Ultimate also on last week, and there was no cry for Stan (who is Stan anyway?). I'm having Windows 7 in my office, and I had VS 2010 installed before 2012. On my home computer, which is a Win8, I had a clean install, and no VS 2010 before, and Stan is needed. Maybe it is related that if we don't have VS 2010 the new studio is gonna cry for Stan.

    • נערך על-ידי unbornchikken יום חמישי 30 אוגוסט 2012 08:29
    • נערך על-ידי unbornchikken יום חמישי 30 אוגוסט 2012 08:30
    •  
  • שבת 01 ספטמבר 2012 11:35
     
     
    The issue is present in VS 2012 RTM Ultimate also.

    Have tha same issue (VS2010 sp1 and VS2012 rtm are installed side-by-side) . 'Code Analisys' tab stops working after CC installation:' An error occurred trying to load the page.984ae51a-4b21-44e7-822c-dd5e046893ef'.

    Even after uninstallation of CC 'stan-package error' appears(however 'Code Analisys' tab starts working).

    VS2010 sp1 works perfect.  CC version 1.4.50813.1. 'Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe /setup' does not help.

  • יום שני 03 ספטמבר 2012 02:37
    בעלים
     
     

    Do you know what locale your machine is set to? We have identified what we think is the problem and it seems to be related to that. We are testing out a fix and hope to have a new release in the next couple of days.


    Mike Barnett

  • יום שלישי 04 ספטמבר 2012 11:19
     
     

    Hello Mike,

    System locale is Russian(Russia), format is English(Australia).



    Nikita Govorov


    • נערך על-ידי Nik Govorov יום שלישי 04 ספטמבר 2012 11:21
    •  
  • יום רביעי 05 ספטמבר 2012 12:45
     
     

    My System locale is German(Austria)

    Running VS 2012 Professional (RTM) on Windows 8 Professional 64 bit (RTM)

    No VS 2010 installed

    StanPackage load error stil occurs

    Wilhelm

  • יום שישי 07 ספטמבר 2012 03:28
    בעלים
     
     

    Okay, that confirms what we thought was the problem. We have fixed it and are in the process of testing it internally before we publish it. It should just be another day or two.

    Sorry for the problems!


    Mike Barnett

  • יום שישי 07 ספטמבר 2012 10:36
     
     
    Cool, thanks. Look forward to testing new version.

    Nik Govorov

  • שבת 08 ספטמבר 2012 07:18
     
     

    Thanks!

    I've got it working on my windows 7 machine  - but fails on my windows 8 (Swedish locale) - so I really hope your next release will make me migrate my customer project onto windows 8 :)

    Thanks!

  • יום ראשון 09 ספטמבר 2012 16:17
     
     

    Hi,

    I am having the same problem with windows 8 enterprise and studio 2012 premium. (uk edition).

    I hope there is a fix soon.

  • יום שלישי 11 ספטמבר 2012 06:26
     
     
    It's Hungarian.
  • יום רביעי 12 ספטמבר 2012 16:32
    בעלים
     
     תשובה
    Okay! We just put out a new release (v1.4.50910.0) that should fix this problem. Please install it (and do *not* manually execute "devenv /setup", that should now happen as part of the installation --- which makes it take longer) and let us know if it doesn't work.

    Mike Barnett

  • יום רביעי 12 ספטמבר 2012 22:52
     
     

    That worked like a charm!

    Many thanks

     Mario

  • יום חמישי 13 ספטמבר 2012 09:24
     
     

    Works for me now

    Thanks

    Wilhelm

  • יום שישי 14 ספטמבר 2012 03:25
     
     
    Works for as well. Thanks.

    Nik Govorov

  • יום שישי 14 ספטמבר 2012 06:37
     
     
    Works. Thx.