I had the same build error but the build action was already set to Page. Trying Build Action set to ApplicationDefinition (error: there can only one instance of that), and setting it back to Page, fixed the build error. Sounds like black magic, but it worked for me.