Visual Studio Compiles when Bad Code Exists (c#)

Discussion in 'ASP .Net' started by bholland, Feb 2, 2006.

  1. bholland

    bholland Guest

    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?
    bholland, Feb 2, 2006
    #1
    1. Advertising

  2. bholland

    bholland Guest

    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.
    bholland, Feb 2, 2006
    #2
    1. Advertising

  3. bholland

    bholland Guest

    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.
    bholland, Feb 2, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wh
    Replies:
    2
    Views:
    495
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. Amelyan
    Replies:
    4
    Views:
    449
    Juan T. Llibre
    Nov 4, 2005
  3. Mitch
    Replies:
    4
    Views:
    569
    Mitch
    Apr 22, 2004
  4. Thirumalai
    Replies:
    0
    Views:
    631
    Thirumalai
    May 22, 2006
  5. rockdale
    Replies:
    1
    Views:
    588
    Juan T. Llibre
    Aug 23, 2006
Loading...

Share This Page