Okay, this is more of a build error than a programming error. I have never had much reason to get my hands dirty with builds, so this error is baffling me.
I think this happened to me when I a tried to Web Publish a project in VS2012 that had originally been a VS2010 project. So recreating the project in VS2012 is a way to cure it.
Or as @Giacomelli mentions, deleting the reference to the v10.0 targets. Note that V10.0 = VS2010 and v11.0= VS2012