Visual Studio Development Bookmark and Share   
 index > Visual Studio WPF Designer > VS2008 SP1 on XP SP3 gets in loop trying to open .xaml in designer - have to kill it
 

VS2008 SP1 on XP SP3 gets in loop trying to open .xaml in designer - have to kill it

When I try to open an .xaml file using VS2008 SP1 on XP SP3, VS displays the designer pane, then displays it again and again.... I have to kill VS to get out of the loop.

The .xaml file in-question is the WatchList.xaml file in the MVVM.Demo.Client project in Jason Dolinger's (excellent) MVVM demo:  http://www.lab49.com/files/MVVM.Demo.sln.zip

Anyone else had this kind of problem?  Is there perhaps something I need to do to allow WPF dev under XP?

DT

dthouston  Monday, October 05, 2009 8:02 PM
More info: the problem does NOT appear on another developer's XP SP3 system. 

DT
dthouston  Tuesday, October 06, 2009 4:34 PM
Here's still more info:

The solution consists of these projects:

MVVM.Demo.Client
MVVM.Demo.StockProvider
MVVM.Demo.Tests

The .Client project has a reference to the assembly created by the .StockProvider projects. All projects have been built and the reference is resolved.

The WatchList.xaml file which causes the endless loop in the designer is in the MVVM.Demo.Client project. 

Based on my experiments, the problem seems to be related to the following xmlns declaration in the WatchList.xaml file: 

xmlns:model="clr-namespace:MVVM.Demo.StockProvider;assembly=MVVM.Demo.StockProvider"

Curiously, if I have MVVM.Demo.Client set as the startup project and then try to open the WatchList.xaml file, the XAML pane of the designer shows the squiggly error:  "Assembly MVVM.Demo.StockProvider not found ..." for the above statement. And the designer pane shows the "Problem loading" error. 

OK, so I have a reference problem.  Except that I can hit F5 and run the app without problems!

But (and this is where it gets really strange) if I have the MVVM.Demo.StockProvider as the startup project and try to open the WatchList.xaml file (in the .Client project), the XAML pane displays OK and the Designer pane displays OK (briefly), but then begins an endless loop, displaying the pane again and again. Then I have to kill VS2008.

If I remove the xmlns declaration (and the XML statements that refer to model) the xaml file will open OK in the XAML and Designer panes.

BTW: I spent 1/2 day completely un-installing/re-installing VS2008 + SP1, and it didn't help. 

Any ideas?

Thanks,

DT

dthouston  Wednesday, October 07, 2009 7:01 PM
I found the problem:  I had a # char in my path.

(is this problem documented somewhere?)

DT
dthouston  Wednesday, October 07, 2009 8:18 PM

The presence of the # character in the path for a WPF or Silverlight projects causes issues in the WPF and Silverlight designers for Visual Studio 2008 and Visual Studio 2010 Beta 1. The issue has been fixed in later releases of Visual Studio 2010, and will be visible in the next public beta of that product.

Sorry for the inconvenience this has caused you,

Mark


Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
Mark Wilson-Thomas  Monday, October 12, 2009 6:56 PM

You can use google to search for other answers

Custom Search

More Threads

• UserControl Dependency property causes wpf designers to fail.
• Can't create Windows WPF Application
• WPF Custom Control: To Show up description for a property of the control in PropertyGrid
• Synchronize name changes between XAML and C# code?
• Flash button not working in Visual Studio
• Designing UserControl That Inherits From an Abstract Class
• How to hide classes from VS Toolbox?
• RTM Additional features
• WPF UI design - need help
• Frequent VS hangs during XML-editing of XAML files