Came across this problem a few days ago and it was so frustrating, I was simply unable to run the application (I was working on the step by step guide as you might see in the picture).
I tied to clean the solution, restart VS and re open the project, but nothing worked.
Until I cleared out the Bin and Obj folders. So if you get this error, to to those folders and clean the out (delete everything in them), and build the application. Hopefully, like me, you will be able to run the application without that error coming.