views:

707

answers:

5

When I work on Silverlight projects within Visual Studio 2008, I regularly notice that the XAML editor hangs for up to 10 seconds. This because Visual Studio consumes 100% CPU during that timeframe. Any ideas how I could fix that? I assume this is some kind of background compiling for itellisense or something similiar. It happens during editing, multiple times an hour, without me doing any special actions.

System:

  • Server 2008 Std
  • Visual Studio 2008 SP1
  • latest updates...

I wonder if anyone else experienced this issue. Any help would be appreciated.

+1  A: 

1.Close all other apps you are running.Only use VS 2008 SP1.

2.Install KB958017 - Rollup Hotfix for several issues in WPF designer Visual Studio 2008

3.Move to VS 2010 !!! This is what it should have been like !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

4.Get more RAM.

5.Defragment HDD...

????

abmv
KB958017 is already included in the current SL Toolkit itself afaik.
driAn
+1 KB958017 worked great for me.
blesh
+1  A: 

I'd recommend using Expression Blend. It doesn't suffer the same terrible performance as VS.Net for XAML and is more powerful and flexible for designing interfaces. I curse everytime I accidentally double click a XAML file in VS.Net and am franticalyl hitting the escape key.

sipwiz
heee welcome to the club!
abmv
second that, blend is a much better designer until we get vs 2010.
James Cadd
I thought Blender does not support Intellisense for xaml?
driAn
A: 

What is your systems RAM? I have 3 GB ram and XAML editor hangs for 1/2 seconds sometimes but not 10 seconds.

I usually close all other apps while working with WPF applications. I also use Blend which is more faster comapred to VS xaml editor.

Shoban
I got 2GB of RAM.I don't use Blend because it offers no Intellisense so far.
driAn
+3  A: 

The problem is that the xaml editor takes so long to draw the preview. Do you need the visual preview? If you don't, you can turn it off, and that's what we do on the Silverlight Tour. Tools->Options->Text Editor->XAML->MIscellaneous->"Always open documents in full XAML view". This option gives you all of the benefits of auto-complete without the killer wait times ;)

Erik Mork
-1 This solution didn't work at all for me, it's not even really accurate. Installing KB958017 as abmv suggested worked great. The visual designer renders as fast as anything now, and accessing the files is seemless. The setting mentioned in this answer does not disable the visual designer.
blesh
It didn't work? How could it not work? lol. Turning off the preview changes render time to 0. So it does work ;) This discussion happened back in June. Before Silverlight 3, btw. The default changed in 3.
Erik Mork
+3  A: 

right click on the xaml file select open with select the source code editor

You will not get the visual preview however the file will open instantly and still have intellisense.

zachary
Wow, why didn't I think of this - thank you, this really sped up my work!
Tomáš Kafka