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

I've recently had the same error and found the following in the output window:

10>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets(268,9): error MC6000: Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list.

The solution for me was to add the missing references to my project.


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


Go to "Build > Configuration Manager..." and Make a new platform for x86 for all your projects.
It doesn't have to be the active one, you can leave that as Any CPU.

Hope it works as for mine...


For me it helped to set the "Target framework" in application-properties to .NET 4.0