HighTechTalks DotNet Forums  

A headscratcher here for sure

VB.net Upgrade microsoft.public.dotnet.languages.vb.upgrade


Discuss A headscratcher here for sure in the VB.net Upgrade forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Earl
 
Posts: n/a

Default A headscratcher here for sure - 08-28-2006 , 09:59 PM






I had an old VB program that I pulled into VS2005 (VB.Net) to see if I could
get anything useful out of the upgrade wizard. Well the program did not have
a Sub Main, so I added that to a module and tried to set that as the startup
object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()

Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the upgrade
"wizard" created in a buried file. Any ideas?



Reply With Quote
  #2  
Old   
JWHM
 
Posts: n/a

Default Re: A headscratcher here for sure - 09-04-2006 , 02:40 PM






Hi,

It might be in the generated code of your project. This is normally not
visible. Right Click in the source code of your form and select Go To
Defenition.

Good luck

JWHM

"Earl" <brikshoe (AT) newsgroups (DOT) nospam> schreef in bericht
news:uu5TpcxyGHA.3280 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Quote:
I had an old VB program that I pulled into VS2005 (VB.Net) to see if I
could get anything useful out of the upgrade wizard. Well the program did
not have a Sub Main, so I added that to a module and tried to set that as
the startup object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()

Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the
upgrade "wizard" created in a buried file. Any ideas?





Reply With Quote
  #3  
Old   
Earl
 
Posts: n/a

Default Re: A headscratcher here for sure - 09-05-2006 , 01:39 AM



Good thought, but the search still should have found it (even in the XML
files). Once I got rid of all the old references and VB.Compatibility crap,
the message went away. I'm guessing it was buried in one of the
compatibility dlls.

"Upgrade" is such a misnomer for VB to VB.Net, especially if you have
anything non-trivial to "upgrade". Better to just rewrite it... in C#

"JWHM" <joopmuis (AT) tiscali (DOT) nl__nospam> wrote

Quote:
Hi,

It might be in the generated code of your project. This is normally not
visible. Right Click in the source code of your form and select Go To
Defenition.

Good luck

JWHM

"Earl" <brikshoe (AT) newsgroups (DOT) nospam> schreef in bericht
news:uu5TpcxyGHA.3280 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I had an old VB program that I pulled into VS2005 (VB.Net) to see if I
could get anything useful out of the upgrade wizard. Well the program did
not have a Sub Main, so I added that to a module and tried to set that as
the startup object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()

Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the
upgrade "wizard" created in a buried file. Any ideas?







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.