locked
Designer Mode Rarely Works - throws exception

    Question

  • I'm using Visual Studio 2012 Premium.

    When I create a Blank Windows Store application - clicking the MainPage and moving to designer view, I simply get the following exception:

    System.Runtime.InteropServices.COMException
    Error HRESULT E_FAIL has been returned from a call to a COM component.
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

    System.Runtime.InteropServices.COMException
    Error HRESULT E_FAIL has been returned from a call to a COM component.

    Server stack trace: 
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    System.Runtime.InteropServices.COMException
    Error HRESULT E_FAIL has been returned from a call to a COM component.
       at Windows.Foundation.IAsyncOperation`1.GetResults()
       at Microsoft.Expression.WindowsXamlPlatform.Host.RuntimeResourceManager.GetStorageFileForPath(String indexPath)
       at Microsoft.Expression.WindowsXamlPlatform.Host.RuntimeResourceManager.ProcessIndexUpdates()
       at Microsoft.Expression.WindowsXamlPlatform.Host.RuntimeResourceManager.OnNewIndex(String newFileName, String newResourceMapName)
       at Microsoft.Expression.WindowsXamlPlatform.Host.XamlUIPresenterHostServices.OnResourceIndexUpdated(HostResourceIndexUpdatedEventArgs args)
       at Microsoft.Expression.WindowsXamlPlatform.Host.WindowsUIXamlResourceIndexProvider.OnResourceIndexUpdated(EventArgs args)
       at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    Please advise.

    Thank you.

    • Moved by CoolDadTxMVP Tuesday, October 16, 2012 3:44 PM Windows store related (From:Visual C# IDE)
    Tuesday, October 16, 2012 3:04 PM

Answers

All replies

  • I also get that, but also occasionally get:

    System.UnauthorizedAccessException
    Access to the path 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\ComponentArt.WinRT.DV.Charting\2012.1.1871\References\CommonConfiguration\neutral' is denied.
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)

    Yet, sometimes it works!

    Friday, October 19, 2012 11:32 PM
  • Hi,

    "This issue has been fixed in a future update to Visual Studio and Blend." Please see Unni's reply in this post. http://social.msdn.microsoft.com/Forums/en-US/toolsforwinapps/thread/1eab0f4e-e18d-4c1b-b644-ba5e8fc947cd

    Best regards,


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, October 29, 2012 8:37 AM
    Moderator
  • I'm still seeing this problem, too.  I agree that the suggestion by Min Zhu regarding Unni's post is not the same issue.  I've also tried the steps in this post (http://blendinsider.com/xaml/known-issue-xaml-designer-in-visual-studio-11-beta-crashes-on-launch-2012-03-07/) and I'm still seeing the same problem. 

    Any suggestions, MSFT?

    -Ben

    -- ps. I wish there were a way to mark an "Answer" as "Not An Answer". 


    Benjamin Day - Microsoft MVP for Visual Studio ALM - http://www.benday.com/blog

    Thursday, November 29, 2012 8:03 PM
  • Benjamin,

    I will suggest the solution offline (since I am not yet 100% sure if it works for all cases). You can then post back if it works for you.

    Please get in touch with me offline at unnir at Microsoft dot com.

    Thanks,
    Unni

    P.S: Also, there are multiple issues reported here, which might not all have the same solution. This one is solely for a call stack that has the following:
    at Microsoft.Expression.WindowsXamlPlatform.Host.RuntimeResourceManager.GetStorageFileForPath(String indexPath)


    Unni Ravindranathan, Program Manager, Visual Studio and Blend This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, November 30, 2012 4:22 AM