Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2007

Tip: Looking for answers? Try searching our database.

Application.Run(new Main()) - The specified module could not be found.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LQQKIN - 23 Mar 2007 16:11 GMT
HI,
When i try to run amd debug my project i get following error.
   - The specified module could not be found. -
This error is getting thrown on  Application.Run(new Main())

From what it looks like it can not find some DLL that i have referenced.

If i create a new project with out those dll's everything works fine, but as
soon as i add them and start using them i get the same error.

Any help is greatly appreciated

Thanks
VJ - 23 Mar 2007 16:31 GMT
why is it new Main().. are you calling this from within your Main function
.. Something is not right...!!

VJ

> HI,
> When i try to run amd debug my project i get following error.
[quoted text clipped - 10 lines]
>
> Thanks
LQQKIN - 23 Mar 2007 16:42 GMT
static class Program
   {
       /// <summary>
       /// The main entry point for the application.
       /// </summary>
       [STAThread]
       static void Main()
       {
           Application.EnableVisualStyles();
           Application.SetCompatibleTextRenderingDefault(false);
           Application.Run(new Main());
       }
   }
}

Main() is the constructor of the Main form that comes up, It has only
InitializeComponent();

Thanks

> why is it new Main().. are you calling this from within your Main function
> .. Something is not right...!!
[quoted text clipped - 15 lines]
>>
>> Thanks
VJ - 23 Mar 2007 17:12 GMT
I would suggest naming your Form something other than Main.. not a good idea
to name it same as entry point (even if it will work). Just my thought, I
will chk and see if this will work!! and I would post a feedback

VJ

> static class Program
>    {
[quoted text clipped - 35 lines]
>>>
>>> Thanks
VJ - 23 Mar 2007 17:42 GMT
I did create a sample app with One Form (called it Main) and added a button
and 2 textboxes, it opened fine . No issues. So I guess you can name it
Main, sounds very scary but works.. Now if you have usercontrols in the
application, and if they have dlls referenced, then a chain is broken some
where, so you have to use your output window to see what dlls are loading
and what are not.. Try and Debug, thats the way to solve this.

VJ

> HI,
> When i try to run amd debug my project i get following error.
[quoted text clipped - 10 lines]
>
> Thanks
LQQKIN - 23 Mar 2007 21:51 GMT
Pronlem was in the dll's used by the 3rd party dll's. Thye did not reference
them correctlly and it did not work for that reason.

Hope this helps someone

> HI,
> When i try to run amd debug my project i get following error.
[quoted text clipped - 10 lines]
>
> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.