title: Why am I getting, "Object reference not set to an instance of an object." but no line of code is implicated?
body: <p>When I try to build my VB.NET solution, I get the error, "Object reference not set to an instance of an object." but in the Error List pane, the File, Line, Column, and Project columns are blank:</p>
  
  <p><a href="https://i.stack.imgur.com/o3Tag.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o3Tag.png" alt="enter image description here"></a></p>
  
  <p>How can I solve the problem if it won't tell me where it is?</p>
  
  <h2>UPDATE</h2>
  
  <p>I selected the Project, then "Show Project Dependency Diagram" and got this:</p>
  
  <p><a href="https://i.stack.imgur.com/RhLAv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RhLAv.png" alt="enter image description here"></a></p>
  
  <p>I don't know what I'm looking at.</p>
  
  <h2>UPDATE 2</h2>
  
  <p>I don't know if this is unusual or to be expected, but if I mash F5, I do get a page in a browser (<a href="http://localhost:2030/" rel="nofollow noreferrer">http://localhost:2030/</a>) without any err msg; granted, the page looks like North Dakota from an airplane in winter.</p>
  
  <h2>UPDATE 3</h2>
  
  <p>Now (after fixing a couple of obvious issues, such as unterminated html tags), it won't even say it's fine with a Rebuild All (improving it made it "worse").</p>
  
  <p>With both Rebuild All and Build, I get, "<em>Object reference not set to an instance of an object.</em>" but with no indication of where that unset object reference was found.</p>
  
  <p>Scarier yet, when I run <em>Resharper > Inspect > Code Issues in Solution</em>, there are, among other things, 10 VB Compiler Errors, of the following two types:</p>
  
  <pre><code>Cannot resolve symbol '_GridName'
  Cannot resolve symbol 'Class1'
  </code></pre>
  
  <p>Why would there be compiler errors and yet it still compiles? This is getting curiouser and curiouser.</p>
  
  <p>As an idea for how many warnings, errors, etc. this project has, here is an overview of the things that Resharper tsk-tsks about:</p>
  
  <p><a href="https://i.stack.imgur.com/aFtox.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFtox.png" alt="enter image description here"></a></p>
  
  <p>20 errors and a thousand other "issues" - it makes me feel like writing a country song!</p>
  
  <h2>UPDATE 4</h2>
  
  <p>When I right-click the project and select "View in Page Inspector" I see the following:</p>
  
  <p><a href="https://i.stack.imgur.com/ulySz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ulySz.png" alt="enter image description here"></a></p>
  
  <p>Could this be the problem and, if so, how do I see to it that the Dev server is running on .NET 4.0 or later?</p>
  
  <p>Or is this a red herring?</p>
  
  <h2>UPDATE 5</h2>
  
  <p>Now there's a Warning that may shed some light here:</p>
  
  <p><em>C:\MemberOrderEntry\MembersOrderEntry\MembersOrderEntry\Weyand\Default.aspx: ASP.NET runtime error: Object reference not set to an instance of an object.</em></p>
  
  <p>This is the line of code the warning implicates:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Weyand._Default" title="Web Order Entry" %&gt;
  </code></pre>
  
  <p>The whole Default.aspx file is:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Weyand._Default" title="Web Order Entry" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;Order Entry Login Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The other warning is, "<em>Validation (XHTML 1.0 Transitional): Element 'page' is not supported.</em>  C:\MemberOrderEntry\MembersOrderEntry\MembersOrderEntry\Weyand\Default.aspx"</p>
  
  <p>Does this mean anything/make sense to anybody? What needs to be removed or changed in there?</p>
  
  <p>There are many other files with the same exact code:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Vinyard._Default" title="Web Order Entry" %&gt;
  </code></pre>
  
  <p>(except they have "Vinyard" or something else instead of "Weyand"); so why aren't they several Warnings about that same thing, rather than just this?</p>
  
  <h2>UDPATE 6</h2>
  
  <p>Okay, then! (arghh) If I expand those files in the Solution Explorer, they <em>do</em> elicit warnings. Why would that be? The compiler doesn't notice htem unless they are expanded in Solution Explorer? That makes no sense...</p>
  
  <h2>UDPATE 7</h2>
  
  <p>Is "Element 'page' is not supported" the root of the problem?</p>
  
  <p>With three of the folders expanded, I see:</p>
  
  <p><a href="https://i.stack.imgur.com/8mX2X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8mX2X.png" alt="enter image description here"></a></p>
  
  <p>The "page" is like so:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Vinyard._Default" title="Web Order Entry" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  </code></pre>
  
  <p>It seems that each "Page" is problematic; and for each one, there is a possibly corresponding "ASP.NET runtime error: Object ref not set" warning - which may be what causes the error of the same type.</p>
  
  <p>If the 'Page' element is the/a problem, what is the fix for it?</p>
  
  <p>If I simply remove it, like so:</p>
  
  <pre><code>&lt;%@Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Vinyard._Default" title="Web Order Entry" %&gt;
  </code></pre>
  
  <p>...then I get, "Element '' is not supported." It's not just a Catch-22, because many more errors are caught than that, when everything is expanded.</p>
  
  <h2>UPDATE 8</h2>
  
  <p>The errors cause me to wonder: What does the "Inherits" directive signify? I have such as:</p>
  
  <pre><code>Inherits="CapitolCity._Default"
  </code></pre>
  
  <p>In more context, the appear within Default.aspx files like so:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="CapitolCity._Default" title="Web Order Entry" %&gt;
  </code></pre>
  
  <p>There is no "CapitolCity._Default" file anywhere that I can see (which is apparently supposedly what is being "inherited"). What is being inherited here, or trying to be inherited?</p>
  
  <p>In this case, the file with the line above is Default.aspx, beneath/within the \\CapitolCity folder. Beneath it is the Default.aspx.vb file.</p>
  
  <p>There is a \\Default.aspx file, with a Default.aspx.vb beneath it. The first is:</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Web Order Entry" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Is there something wrong with it, and if not, what could be causing this gigantic headache?</p>