• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1641
  • Last Modified:

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

Hi All,

I left visual studio on over night and a project that was building is no longer working.  I get the following error:

"Program 'C:\<PATH>\PhoneApplication\obj\Debug\PhoneApplication.exe' does not contain a static 'Main' method suitable for an entry point"

Here is the begining of my form1.cs file:

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.SqlClient;
using System.Data.Sql;

namespace PhoneApplication
    public partial class Form1 : Form

        #region Set Variables

        //OM Commands
        public string strChdnrc = "";
        public string strChtrfc = "";
        public string strCalf0 = "";
        public string strCalf1 = "";
        public string strAllComm = "";

        //Input variables
        public string strFirstname = "";
        public string strSurname = "";
        public string strFloorPort = "";

Open in new window

Does anyone know how this might be fixed?

  • 2
1 Solution
The Main method should be in the Program.cs file. Can you give us that file?
Are the properties on the file set to Compile ?
ImaCircularSawAuthor Commented:
The program.cs file had been removed from the project.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now