Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiler Error in System File

Status
Not open for further replies.

dushkin

Programmer
Mar 28, 2002
90
US
Hi. I am not sure how to tackle this error. The error is in a file that i didn't wite ... a system file i think. It shows the location of the file but i don't want to muck about in files that i didn't produce. Does anybody recognize this? thanks in advance.

Error Message:

Compiler Error Message: CS1518: Expected class, delegate, enum, interface, or struct

Source Error:

Code:
Line 149:        #line hidden
Line 150:        
Line 151:        public default_aspx() {
Line 152:            System.Collections.ArrayList dependencies;
Line 153:            if ((ASP.default_aspx.__initialized == false)) {
 
a follow up. sorry about the poor formatting in the code blcok. the red line is 151. any help would be great. thanks.
 
This looks like a class constructor. Make sure that it matches it's parent class' name.

For example:

Code:
public class default_aspx
{
    public default_aspx()
    {
    }
}

Hope that helps

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
hi. thanks for the response. i don't think that is it.
the file is a "hidden file" that is referenced at an odd spot:
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\website\b73ee41c\60c28a1f\hovs9xg8.0.cs

the line "public_aspx()" doesn't exist in my files. I have either "default.aspx" or "_default.aspx".

i have checked and am consistent with my naming. of course, i'll recheck. anyway, let me know if anything else occurs.
thanks again.
 
IIS will compile your aspx files the first time they run by calling the CSC.EXE command line compiler. It sounds like the CSC compiler is throwing an error.

Since you're in C#, what might be causing a problem is that default is a keyword (it's used in the switch statement). If that's the name of your class, try naming it something else.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top