MasterPageFile="~/MasterPage.master"
first u need to delete ~/Masterpage.master" from the tag after that place cursor after MasterPageFile=" and press space now u have option to select master page (In other words choose master page again) ,pick the master page after that u didn't get error in the master page