locked
Visual Studio 2013 editing/designing xaml issues

    Question

  • Hi,

    I've upgraded from win 8 and Visual Studio 2012 Prof to win 8.1 and Visual Studio 2013. If I now open an old windows store app solution, I get some error messages if I want to open xaml files, even if I retarget the projects to Windows 8.1.

    First error:

    If I open a xaml page, the designer works as expected. But if I do something (e. g. run the app in the simulator - which works fine), it mostly happens that the xaml designer throws an exception and will not work until I restart Visual Studio. Instead I get the following error message:

    An Unhandled Exception has occurred

    System.InvalidCastException

    Unable to cast COM object of type 'System.__ComObject' to interface type 'VSLangProj.References'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B8758EE4-0553-4BC9-8432-440449D35C14}' failed due to the following error: Error loading type library/DLL. (Exception from H0x80029C4A (TYPE_E_CANTLOADLIBRARY))

       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, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalHostShadowCopyTask.Microsoft.Expression.DesignHost.IHostShadowCopyTask.ContinueShadowCopyTask(IEnumerable`1 assemblyPaths)
       at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.FlushShadowCopyUpdateQueue()
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Microsoft.Expression.DesignHost.Isolation.DesignerProcess.RunApplication()
       at Microsoft.Expression.DesignHost.Isolation.DesignerProcess.DesignProcessViewProvider.AppContainerDesignerProcessRun(String[] activationContextArgs)
       at Microsoft.Expression.DesignHost.Isolation.DesignerProcess.DesignProcessViewProvider.<>c__DisplayClass7.<applicationView_Activated>b__6()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

    Second error:

    If I double click on a Styles.xaml (no page/view) located in a windows store project, everything works fine. But if I double click on a Styles.xaml located in a class library project, I get an error popup:

    One or more errors occurred.

    Thats it. If I open it with right click => Open With => XML Text Editor everything works fine.

    What can I do?

    Thanks 
    Stefan
    Wednesday, April 16, 2014 7:55 AM

All replies

  • Moving to a more appropriate forum.

    Esther Fan | Visual Studio | If a post answers your question, please mark it as the answer. Thanks!

    Wednesday, April 16, 2014 5:59 PM