11

I have a problem with Visual Studio 2012 that I'm hoping someone can help me out with.

Visual Studio hangs when I try to modify a XAML file. Admittedly my solution contains over fifty projects and I am running ReSharper and StyleCop. This is my first day in a new job and my first experience with XAML so I'm trying to make a good impression!

What can I try to sort out this issue?

Thanks in advance, Mark

serlingpa
  • 12,024
  • 24
  • 80
  • 130

4 Answers4

12

After a bit of googling, I found the solution to my problem here: http://weblogs.asp.net/fmarguerie/archive/2009/01/29/life-changer-xaml-tip-for-visual-studio.aspx

serlingpa
  • 12,024
  • 24
  • 80
  • 130
  • The always open documents in full XAML view didn't work for me. VS will still occasionally open in the designer. The second tip however is an absolute winner. It makes VS not use the designer at all for XAML files. – donovan Jul 24 '13 at 04:00
  • The solution was to use "Source Code (Text) Editor" instead of "XAML Designer" or "XML (Text) Editor". I am trying it right now. But unfortunatelly ReSharper seems to make it hang again. – ecth May 31 '21 at 10:33
0

Try to suspend/uninstall Resharper and all other plug-ins for Visual Studio. This worked for me whereas all other methods did not.

Also try to run VS with /SafeMode flag and see if it works properly.

Ivan Yurchenko
  • 3,762
  • 1
  • 21
  • 35
0

This is still issue in 2013 (as of May 2016). The suggested solution above is not helping.

pixel
  • 9,653
  • 16
  • 82
  • 149
-2

With my Visual Studio 2012.4 I found that while opening XAML in design mode, XDesProc was using 2gb of my RAM and 25% of CPU (i7 8 core), I resolve the problem by turning off the data loading in View Model’s constructor if in design mode. Loading the ItemsSources of my many Comboboxes just bogged down the designer. This way I can still have my designer. Don't forget to import System.Windows and System.ComponentModel in your ViewModel and add these code below in the constructor

If DesignerProperties.GetIsInDesignMode(New DependencyObject) Then

‘ Do nothing

Else

‘ Load the data

End If

Peter.S
  • 57
  • 5
  • I think this is a whole different thing. Even with no view model instance at all, the designer's performance gets horrible. – Crono Oct 06 '16 at 22:20