Sub Main() declared twice?

G

Guest

I have a Windows Forms application I'm trying to starup with a startup class.
Here's the signature of my main in the class:
<STAThread()> Public Shared Sub Main()

I have application framework disabled, but when I compile I get:
'Sub Main' is declared more than once in 'Foo':
Foo.My.MyApplication.Main(Args() As String), Foo.Main.Main()

The app was originally running with a Startup form, but I'm trying to move
to starting from Main(). Before I had it declared as shared and the
<STAThread()> designation (ie, before .Net could find my Main()), the project
would build, but I would get a "NoStartupFormException".

I have no Idea what's going on here. How do I get rid of the Main() in
MyApplication? I would have assumed that disabling the app framework would
do it, but apparently not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top