Closed as not planned
Description
Is your feature request related to a problem? Please describe.
When there's no entry point for the file(s), maybe we could allow the user provider a custom entry point to execute, hope it could be part of the dotnet run file experience #48170
Describe the solution you'd like
When there's no entry point in the file(s), and user user-provided entry point is valid, mark it as the entry point other than fail.
For example, we have the following file named helper.cs
public class Helper
{
public static void AddTest()
{
var a = 1;
var b = 2;
Console.WriteLine(a + b);
}
public static void HelloTest()
{
Console.WriteLine("Hello World!");
}
}
dotnet helper.cs --entry HelloTest
output:
Hello World!