I copied three classes in from another WPF project and then changed their namespaces.
Now when I run the project, I get errors in the \".g.cs\"
I had this issue and tried deleting the obj and bin folders, but that would not work. It finally compiled when I selected Project > Clean and then Project > Build. There must be some Visual Studio cache somewhere else on my system.
obj
bin
Project > Clean
Project > Build