473,738 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual Studio Compiles when Bad Code Exists (c#)

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

public page_load(objec t 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?

Feb 2 '06 #1
2 1102
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.

Feb 2 '06 #2
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.

Feb 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
741
by: jemmaq99 | last post by:
Using Visual Studio .NET 2003 I've tried to add a COM reference to a Windows Form project via the Add Reference dialog (specifically the Active DS Type Library) but always get the error message: "A reference to 'Active DS Type Library' could not be added. The type library wrapper tool 'tlbimp' cannot be found on this system. Please re-install Visual Studio." This occurs regardless of the actual tlb or dll selected and happens on...
26
10870
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio compiles the same solution much faster (about 10 seconds for the first project). My home computer is only marginally faster than the one I have at the office (P4 2.53 vs. P4 2.4, same amount of RAM). On the slow machine, the CPU usage is very low,...
4
1682
by: Brian Barnes | last post by:
I am trying to create a template code behind file for a website which all pages should be inherited from. This base class however, when I try to view the aspx page in Visual studio .NET (2002), it gives me the error: The file failed to load in the web form designer. Plese correct the following error, then load it again: An exception occurred while trying to create an instance of GManWebSync.templates.WebBase (the base class). The...
0
920
by: otto | last post by:
Hi all! I have a trouble with Visual Studio 2005. I have an ASP.NET application with one .aspx page. This aspx page has an imagebutton which image is in a project local folder. If I change in the HTML source code the image path (an erroneous path) the application compiles fine! But in another machine I have an application that when you change the images paths in HTML and that path doesn´t exists tha application doesn´t compile. What is...
3
2065
by: RS | last post by:
Hi all, My code compiles well with gcc on linux and OS X, but now I have to run it at work, and my only choice is Visual Studio .Net 2003 environment on windows, which I had never used before. I've noticed several obstacles with the compilation. For example this environment insists that we put all headers under a stdafx header, which I managed to find a way to get around. But there are other issues. For example, Visual Studio claims...
0
2237
by: Massimiliano Polito | last post by:
It seems the option '/useenv' is no longer supported in in Microsoft Visual .NET 2005. If I run 'devenv /?' I get the following: ------------------------ Microsoft (R) Visual Studio Version 8.0.50727.42. Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Use: devenv
13
4381
by: jc | last post by:
I have written a parser using bison and flex to read ASAP2 file for CAN communications. entire development was done in an unix environment and now the code is ready to be integrated to an existing CAN communication software that i wrote earlier in windows environment(as we get drivers for these CAN cards only for the windows). my problem started when i started to move the code from linux to the visual studio. after many compilation and...
81
4559
by: Peter Olcott | last post by:
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my system so I am not even out of physical RAM, much less virtual memory. Are other people experiencing this same problem?
1
4789
by: Norman Diamond | last post by:
One Visual Studio 2005 solution contains a C# project and C++ ATL DLL project. The DLL compiles fine, gets registered automatically, gets referenced correctly when the C# program compiles, and gets called correctly during execution. So far, so good. During execution of the DLL, a call to the ATL/MFC shared library method CImage::Create returns FALSE. So I tried to set a breakpoint before the call. When not executing, Visual Studio...
0
8968
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6750
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.