I'm trying to get a search contract working on my Win 8 app but after adding a search contract to my project I get the following namespace error:
LayoutAwarePage does not exist in namespace App1.Common.
I do have the correct namespace declarations in the xaml:
xmlns:common="using:App1.Common"
and the LayoutAwarePage is in the correct namespace App1.Common
Restarting VS2012 or doing a delete and rebuild doesn't help. To replicate this problem try the following:
1) create new blank metro app
2) add references to Visual C++ runtime
3) add a search contract to the project (click Yes to automatically add other stuff like LayoutAwarePage etc)
4) rebuild and open SearchResultsPage1.xaml
If you follow the above steps you should see the error and also note that the SearchResultsPage1 does not display in the designer.
This problem only occurs when you add the reference to the Visual C++ runtime. Without this reference adding a search contract works fine!
Any ideas? What am I missing here? Can you replicate the issue using the above steps?
I just ran into the same issue.
Closing VS and deleting the relevant SUO file (in the folder of the solution, may be hidden) worked like a charm.
You must add a reference to the WinRTXamlToolkit: From VS2012 Express
Please close all tabs in VS if opened.
Then Click Build-> clean solution
next click build->rebuild solution
Now open the xaml file.
Hope it will work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With