Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio XAML designer not loading

I'm developing Windows phone apps on my Mac Book Pro Retina (late 2013) on a virtual machine using Parallels 9. I have Visual Studio 2012 and Windows phone 8 SDK installed and everything works fine writing code and testing it on my Lumia phone. The problem is that the XAML designer doesn't load i.e. I get the following error:

System.InvalidOperationException The document failed to open.

    at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)

    at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

Next to this error message, which is displayed instead of the designer, there's a button to reload the designer. But when I press it, it takes forever and gets no results.

I have posted my question in the Microsoft forum but it seems like a ghost town down there.

like image 409
Reza Shayestehpour Avatar asked Mar 14 '14 13:03

Reza Shayestehpour


People also ask

How do I enable XAML designer?

To open this page, choose the Tools menu and then choose Options. To access the XAML Designer property page, choose the XAML Designer node. Settings for the XAML Designer are applied when you open the document. So, if you make changes to the settings, you need to close and then reopen Visual Studio to see the changes.

How do I open XAML in Visual Studio?

To open the XAML Designer, right-click a XAML file in Solution Explorer and choose View Designer. to switch which window appears on top: either the artboard or the XAML editor.

How do I open XAML editor?

To view the settings, choose Tools > Options > Text Editor > XAML.

How do I get XAML design in Visual Studio for Mac?

Visual Studio 2019 You can open the XAML Previewer by clicking the arrows on the split view pane. If you want to change the default split view behavior, use the Tools > Options > Xamarin > Xamarin. Forms XAML Previewer dialog. In this dialog, you can select the default document view and the split orientation.


2 Answers

Steps:

  1. close all visual studio instances
  2. browse to C:\Users\<>\AppData\Local\Microsoft\VisualStudio\12.0
  3. rename or remove "ComponentModelCache"
  4. restart Visual Studio
like image 99
neo-av-in Avatar answered Sep 22 '22 00:09

neo-av-in


I also got an infinitely loading Designer. I solved it by deleting the UserControl and recreating it via source control.

like image 34
DharmaTurtle Avatar answered Sep 22 '22 00:09

DharmaTurtle