开发者

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

开发者 https://www.devze.com 2023-03-19 02:23 出处:网络
Pex 0.94.0.0 Release Visual Studio 10.0.40219.1 Bug Report How to reproduce: Open a class library project

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.Invo开发者_StackOverflow中文版keMarshaledCallbackHelper(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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消