C#/XAML Compile Error – Various Errors (The name “LayoutAwarePage” does not exist”)
Not a good night. After all my progress my Visual Studio 2012 Project for Accountable has bugged out and I get the following error:
Error 5 The name “LayoutAwarePage” does not exist in the namespace “using:Accountable.Common”. G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\BasicPage1.xaml 1 1 Accountable
Weird, as all I have been doing is adding new XAML Views to the project, them bamn, Visual Studio has bugged out. So I furiously last night tried the following:
- Had a look on StackOverFlow and found post which didn’t help at all. I then logged my own here ONLY after trying the following triage on my Project:
- Deleted the SUO (Hidden) file from the Solutions folder. No luck.
- Removed my XAML Files, Classes (Models and ViewModels) and deleted the Common Classes and created a new XAML Basic Page. This causes the Project to reload the Common Classes (including LayoutAwarePage.cs). Rebuilt the Solution, no luck.
- Removed the reference Syncfusion Controls for WinRT XAML which I use for Custom DatePickers. Still the same issue.
- Repaired the Visual Studio 2012 installation using Control Panel->Program Features->Visual Studio 2012->Change. Again, nothing happened.
The (very helpful) guys over on Stack couldn’t resolve the issue as well, plus I created a new Project and this works, so i logged a call on Microsoft Connect here:
As you can see, not very helpful! So I’m now left with no option but to create the Project again, and add it bit-by-bit up from existing code. Hopefully the issue doesnt replicate BUT if it does, I might be able to isolate and provide more detail. For the time being I will keep the SO question open. If anyone else gets this issue, comment here or post on the SO question.