Application is not supported in a Windows Presentation Foundation (WPF) project
Had same issue in VS. I closed and restarted VS and no longer got the error.
Try adding the following references:
- PresentationCore
- PresentationFramework
- WindowsBase
With the ReferenceManager in your project. The above references are the references used by wpf.