Visual Studio Compiles when Bad Code Exists (c#)

B

bholland

I have an ASP.NET 2.0 project that has known bad code:

public page_load(object sender, EventArgs e)
{
foorbar();
}

There is no reference to foobar() ANYWHERE.

I do a build in Visual Studio and it compiles.

When I view the page I get the usual :

The name 'foobar' does not exist in the current context

I can create a new project from scratch and I dont have this issue.

What is wrong with my project?
 
B

bholland

Small Update. I deleted all ASP.NET Temporary Files - No change.

I can right click on the page with problem and click Build and the
build will fail where it should. It looks like the build fails on the
whole project/solution.
 
B

bholland

Figured it out.

I was using master pages and was missing a </asp:content> tag. This
somehow caused the compiler to just stop processing. All code beyond
this page was NOT compiled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top