Interface not registered(0x80040155) when running Pex On Specific machine

0

Pex 0.94.0.0 Release Visual Studio 10.0.40219.1 Bug Report

How to reproduce:

  1. Open a class library project
  2. Create an empty method
  3. Right Click->Run Pex

I run without problem on another machine (In Office, VS2010 Utimate)

But I got this exception on my home computer(VS2010 Professtional)


exception details: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.DTE'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{04A72314-32E9-48E2-9B87-A63603454F3E}') failed due to the following error: Interface not registered. (Exception from HRESULT: 0x80040155) at Microsoft.Pex.VsPackage.VsServiceProviderHelper.GetService[T](IServiceProvider serviceProvider) at Microsoft.Pex.VsPackage.Helpers.ProjectHelper.SaveAllFiles(IServiceProvider serviceProvider) at Microsoft.Pex.VsPackage.Actions.ActionComponent.SaveAll() at Microsoft.Pex.VsPackage.Actions.ExplorationActionBase.InternalExecute() at Microsoft.Pex.VsPackage.Actions.ActionComponent.Execute(Object target)


Current stacktrace at Microsoft.Pex.VsPackage.Controls.ErrorReport.CreateReport(Exception ex) at Microsoft.Pex.VsPackage.Controls.ErrorReport.<>c_DisplayClass4.b_3() at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at Microsoft.Pex.VsPackage.Helpers.UIThreadInvoker.SafeMethodInvoker.Invoke() at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


relevant environment variables: COR_ENABLE_PROFILER= COR_PROFILER= PROCESSOR_ARCHITECTURE=x86


machine data: processor count = 4

visual-studio-2010
pex
asked on Stack Overflow Jul 11, 2011 by PikachuEXE

1 Answer

0

Turns out to be some weird registry problem
Reinstalling Windows can solve it

answered on Stack Overflow Aug 3, 2011 by PikachuEXE

User contributions licensed under CC BY-SA 3.0