Home Dashboard Directory Help

XAML designer doesn't work by Яков


 as By Design Help for as By Design

Sign in
to vote
Type: Bug
ID: 762100
Opened: 9/11/2012 7:32:51 AM
Access Restriction: Public
User(s) can reproduce this bug


I am trying to develop Metro application. I have created some layout aware pages - very simple.
After I added lots of code, the Visual Studio XAML designer stopped working. When I try to open the layout aware page (any of the two I have created), the following message appears:

Build the Project to update Design view.
The Design view cannot display correctly because some custom elements have not yet been built.

The following is available in the Error List window:
Error    1    The name "LayoutAwarePage" does not exist in the namespace "using:SpecialistMetro.Common".    C:\Users\jacob\Documents\Visual Studio 2012\Projects\SpecialistMetro\SpecialistMetro\HomePage.xaml    1

Like in the following thread:

But the project compiles and runs normally.

Rebuild doesn't help.

Sign in to post a comment.
Posted by Juan Morató on 2/20/2013 at 12:59 AM
I have the same error.

I have tried the following with no luck:
- I do not have types outside the root namespace of the application
- I have set SuspensionManager to public sealed
- I have closed all, rebuilt the project and solution and restarted VS

Posted by namar777 on 12/19/2012 at 1:19 PM
I have found the bug in my very own code base -.-.

Specifically, I was passing an std::vector::iter pointer to a function expecting wstring pointer, amongst other culprits. Fixing this made my application work!

Try to scan your codebase for changes made around the time your project stopped displaying the xaml page.
Posted by garfbradaz_ on 11/19/2012 at 12:54 PM
I'm getting the exact same issue and cannot resolve it with your workaround:

Posted by Microsoft on 10/10/2012 at 12:06 PM
We investigated this problem, it looks like you have types outside the root namespace of the application ex:

namespace SomethingElse
public ref class MyButton: Windows::UI::Xaml::Controls::Button

Where as your root namespace is "App32" or something similar. There are known architectural limitation in XAML Designer where we are able to instantiate types outside the root namespace at design-time. To work-around this issue, we recommend you to nest the namespaces inside the root name space, ex:

namespace App32
namespace SomethingElse
public ref class MyButton: Windows::UI::Xaml::Controls::Button

This should fix this problem and you should be able to use the designer again. If this still doesn't work, send me an email at navits at microsoft dot com and I will take a look.

Posted by Kate Gregory on 10/2/2012 at 12:25 PM
My SuspensionManager was already sealed but not public; making it public changed nothing, and the workaround about closing everything and re-opening did not work either.
Posted by SDNetworksInc on 10/1/2012 at 6:46 AM
This issue can be fixed by changing the "class SuspensionManager " to "public sealed class SuspensionManager" and it works.
Posted by Infest696 on 9/24/2012 at 10:52 AM
I also have this problem. Is there a solution available?
Posted by Microsoft on 9/12/2012 at 6:33 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Яков on 9/12/2012 at 4:09 AM
Thank you for quick response.
I have uploaded the SpecialistMetro.zip file that contains stripped down variant of my project and exposes the described misbehaviour.
Posted by Microsoft on 9/11/2012 at 6:51 PM
Thanks for your feedback.

In order to fix the issue, we must first reproduce the issue in our labs. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project so that we can conduct further research?

Please submit this information to us within 3 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 9/11/2012 at 7:52 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Tom McCartan on 3/21/2013 at 1:03 PM
I have encountered this error and was able to work backwards to determine the cause, in my case. I was using SQLite and to use those libraries I had to specify a target platform. In my case I specified x64. After doing this, everything still worked, but when I closed Visual Studio and re-opened the project, I received this error message. the project still compiled and ran, but I could not use the XAML designer.

So what I did, was changed the target platform from x64 to x86. then I compiled the project. Closed Visual Studio, re-opened it and the XAML designer loaded properly.

Not sure exactly why. I suspect it was some conflict in the app between x64 and x86.
Posted by Oliver_H on 9/30/2012 at 11:48 AM
The following steps solves the problem permanently (for this one project) for me:
1) clos all open file tabs
2) clean project and rebuild
3) restart VS12

Good luck ;)
File Name Submitted By Submitted On File Size  
SpecialistMetro.zip 9/12/2012 472 KB