Bootstrap FreeKB - Visual Studio - Resolve error "The file MasterPage.master does not exist"
Visual Studio - Resolve error "The file MasterPage.master does not exist"

Updated:   |  Visual Studio articles

Let's say you are getting this error when attempting to view your default.aspx page in a browser. In Visual Studio, when looking at the code of the default.aspx page, notice the line MasterPageFile="~/example.Master".

<%@ 
Page Title="" 
Language="vb" 
AutoEventWireup="false" 
MasterPageFile="~/example.Master" 
CodeBehind="default.aspx.vb" 
Inherits="example._default" 
%>

 

Sometimes, changing the ~ (tilde) to a . (period) will resolve this error.

<%@ 
Page Title="" 
Language="vb" 
AutoEventWireup="false" 
MasterPageFile="./example.Master" 
CodeBehind="default.aspx.vb" 
Inherits="example._default" 
%>

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 87148d in the box below so that we can be sure you are a human.