I know a variant of this question has been asked before but none of the answers there work in my case (and I'm not sure if the other user could actually compile or not)
I create a brand new WPF UserControl file. Visual Studio now displays blue lines around the <Grid></Grid> with this error:
The type 'UserControl' does not support direct content
My project already has references to System.Xaml and UIAutomationProvider, as well as the other WPF assemblies PresentationCore, PresentationFramework and WindowsBase.
If I build the solution the error goes away. If I then make a single change to the XAML file (like adding a space somewhere) the error returns.
This is extremely annoying as my entire XAML file ends up being underlined by Visual Studio as having an error and makes it hard to read the contents, when in reality it does not actually have any errors.
What can be done to remedy this situation?