Expand Minimize
12 out of 36 rated this helpful - Rate this topic

Compiler Error CS5001 

Error Message

Program 'program' does not contain a static 'Main' method suitable for an entry point

This error occurs when no Main method is found in the code that produces an executable file. This error also occurs if the entry point function, Main, is defined with the wrong case, such as lower-case main, or not declaring Main as static.

Example

The following example generates CS5001.

// CS5001.cs
// CS5001 expected
public class a
{
   // Uncomment the following line to resolve.
   // public static void Main() {}
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.