For a .Net Framework project set the Startup Object in the project properties.
Following code generates CS0017 when the Startup Object is not set -
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TwoMain
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello from Program.Main");
}
}
class DupMain
{
static void Main(string[] args)
{
Console.WriteLine("Hello from DupMain.Main");
}
}
}
Set the Startup Object in response to the error message -