[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-05-05
4
Medium Priority
?
1,384 Views
Last Modified: 2012-05-11
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?

Thanks.
0
Comment
Question by:ImaCircularSaw
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
bartvd earned 2000 total points
ID: 35696442
The Main method should be in the Program.cs file. Can you give us that file?
0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35696548
Are the properties on the file set to Compile ?
0
 
LVL 10

Author Comment

by:ImaCircularSaw
ID: 35697878
The program.cs file had been removed from the project.

Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question