You may also see this even though your build actions are set correctly. For example, if you start your project up as an Application, and then later switch it to be a Class Library. In which case you must also remember to delete App.xaml (and the corresponding App.cs).