. Advertisement .
..3..
. Advertisement .
..4..
I am tired of fixing the problem: program does not contain a static ‘main’ method suitable for an entry point in the csharp; even if I get the reference from another forum, it still returns an error:
Does not contain a static 'main' method suitable for an entry point
To identify the problem, I will show you the detail here:
public shell()
{
InitializeComponent();
}
using System;
using System.Windows.Forms;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Data.SqlServerCe;
using System.Diagnostics;
using System.Threading;
using System.Collections.Specialized;
using System.Net;
using System.Runtime.InteropServices;
using watin = WatiN.Core;
using WatiN.Core.Native.InternetExplorer;
using System.Web;
namespace WindowsFormsApplication1
{
public partial class shell : Form
{
How do I do that? Could you support me in improving this problem?
The cause: You get this error because if you added a ‘Empty’ project, it defaults to Console.
The solution: These steps will help you fix this problem:
This was a problem I had to look at, but the solution wasn’t too simple. I created a new, empty project. The new project is automatically added as a console app. However, the new project was an empty project so no Program.cs were created. (As expected)
Just changed the output type in the project properties to Class Library.