I had this problem and its because I wasnt using the latest version of C# (C# 7.3 as of writing this) and I had to change the below internal
access modifier to public
.
internal class Program
{
public static void Main(string[] args)
{
//My Code
}
}
or ammend the .csproj
to use the latest version of C# (this way meant I could still keep the above class as internal
):
<PropertyGroup>
<LangVersion>latest</LangVersion>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>