I downloaded a zip of source files containing a C# project with multiple entry points / Main methods. Since I wanted to tinker around, I created another one like this in a new type/class
class MyExperiments
{
static void Main(String[] args)
{
// do something
}
}
then I switched to project properties. Simply switch the startup object to MyExperiments eh? To my surprise, the dropdown didn't have it. I rebuilt, made the method public, tried a whole lot of stuff.. but to no avail. Finally I edited the .csproj manually in notepad and then it worked. More tinkering around, I removed the parameters to make it
static void Main()
and now VS Project properties could 'see' the startup object. So now I could select it using the dropdown. I then added the String[] back and everything still worked.
Seems a bit weird to me (because the most common form is a Main method with parameters for command line args from the C/C++ times). MSDN says the dropdown will contain valid startup objects if they exist in your project.