1

Resolved

Designer breaks in VS 2013 with simple app

description

If I create a very simple do-nothing Windows 8.1 Store app the designer throws an exception. After hours of spinning my wheels I decided to post here and hope for a solution.

This is the exception shown on the designer surface:

System.Runtime.InteropServices.COMException
Error HRESULT E_FAIL has been returned from a call to a COM component.
at Windows.Foundation.IAsyncOperation1.GetResults()
at Microsoft.Expression.WindowsXamlPlatform.Views.RuntimeResourceManager.GetStorageFileForPath(String indexPath)
at Microsoft.Expression.WindowsXamlPlatform.Views.RuntimeResourceManager.ProcessIndexUpdates()
at Microsoft.Expression.WindowsXamlPlatform.Views.RuntimeResourceManager.OnNewIndex(String newFileName, String newResourceMapName)
at Microsoft.Expression.WindowsXamlPlatform.Views.XamlUIPresenterHostServices.OnResourceIndexUpdated(HostResourceIndexUpdatedEventArgs args)
at Microsoft.Expression.WindowsXamlPlatform.Views.WindowsUIXamlResourceIndexProvider.OnResourceIndexUpdated(EventArgs args)
at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass13.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__12(CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass3
1.<MarshalInWithCancellation>b__2()
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.

Server stack trace:
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalInSynchronous(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.MarshalInWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func2 func, ApartmentState apartmentState)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject, 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(IRemoteHostProject remoteProject, IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IRemoteDesignerService ds, IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass19.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__18(IRemoteDesignerService ds, RemoteCancellationToken remoteToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass5
1.<MarshalOutWithCancellation>b__4(IRemoteDesignerService ds)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass11.<MarshalOut>b__0()
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 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, CancellationToken cancelToken, String methodName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CancellationToken cancelToken, CallSynchronizationMode syncMode, WaitHandle timeoutSignal, String methodName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle
1 targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle1 targetObject, Action1 action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.MarshalOutWithCancellation[TResult](CancellationToken cancelToken, Func`3 func, ApartmentState apartmentState)
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)

comments

tonysneed wrote Dec 29, 2013 at 9:36 AM

Are you getting the error when building the project? Or at runtime? It looks like it's a runtime error resulting from an asynchronous operation.

Please put your project in a zip file and send it to me: tony@tonysneed.com. I'll have a look.

Cheers,
Tony

CarlosP wrote Dec 29, 2013 at 12:25 PM

The exception occurs in Visual Studio's designer window when I open a XAML file that has UI elements in it.

Because the last thing I installed was Simple MVVM I mistakenly associated it with the occurrence of the exception but I have since learned that apparently my VS 2013 installation is hosed because even a simple "Hello World" produces that same exception when I try to open a XAML file in the designer.

Oh well, time to re-install Windows 8.1 I guess.

Thanks Tony!

Carlos

tonysneed wrote Dec 29, 2013 at 1:40 PM

Glad it wasn't a problem with the toolkit. :-) I usually keep a VM set up with Virgin Win 8.1 and also with the dev tools installed, so that in case it gets hosed I can go back to a clean install. And I keep all my files on a cloud drive for backup.

Good luck!

Tony