Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grid is not supported in a Windows Presentation Foundation (WPF) project

I am learning how to create a Class Library (Windows Store apps) and used a UserControl template to add a user control to it.

Then I added a Grid tag to accompanying XAML. However, the tag is underlined with blue squiggles and when I hover over the tag there is

Grid is not supported in a Windows Presentation Foundation (WPF) project

tooltip shows up.

The library seems to build without errors. I've added the library to an application and use the control in its code. The application is also builds just fine. However, when I run the application I get XamlParseException exception.

I am using Visual Studio 2012 RTM. Both the library and the application reference only two standard assemblies (.NET for Windows Store apps and Windows).

What I might done wrong and how should I fix the library?

like image 748
Bobrovsky Avatar asked Oct 26 '12 22:10

Bobrovsky


1 Answers

In my case I switched from Debug to Release, and then back, and the error was gone.

like image 171
StayOnTarget Avatar answered Sep 27 '22 22:09

StayOnTarget