#develope help

This is a discussion on #develope help within the C# Programming forums, part of the General Programming Boards category; I have this error in #develope right after I compile it. I didn't touch the code or anything and this ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    731

    #develope help

    I have this error in #develope right after I compile it. I didn't touch the code or anything and this happens on windows forms.

    Error Code: Program 'path\program.exe' does not have an entry point defined(CS5001)

    And just to make sure cause I can't find it, #develope does use .ent v1.1 right?

  2. #2
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Yes. Which version of #develop are you using, and please post the code (including the project files, just zip the folder). It sounds the Main() form hasn't been marked as [STAThread].

    Edit: Just remembered, STAThread has something to do with indicating the application does or doesn't support multithreading, not the problem you described.
    Last edited by nickname_changed; 02-27-2005 at 06:31 PM.

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Well it didn't let me upload c# files but I posted them else where.

    Here is the link to the zip file...

    http://upload.gm-school.uni.cc/index...Rune%20Hunter&

    The download should popup and work fine.

  4. #4
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    There is no Main() method. Insert this at the bottom of the Form1 class (inside the class):
    Code:
            [STAThread]
            static void Main()
            {
                    Application.EnableVisualStyles();
                    Application.EnableRTLMirroring();
                    Application.Run(new Form1());
            }
    I think this isn't a problem with #develop though. Zip the whole directory including the .combine and project files and post them and we'll see.

  5. #5
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    The Main() method is the method that is called when the application first starts up. When the compiler saw there was no Main(), you got that error message ("...does not have an entry point defined"). Main() is the entry point.

  6. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Code:
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.IO;
    using System.Windows.Forms;
    
    namespace DefaultNamespace
    {
    	/// <summary>
    	/// Description of Form1.
    	/// </summary>
    	public class Form1 : System.Windows.Forms.Form
    	{
    		public Form1()
    		{
    			InitializeComponent();
    		}
    		
    		#region Windows Forms Designer generated code
    		/// <summary>
    		/// This method is required for Windows Forms designer support.
    		/// Do not change the method contents inside the source code editor. The Forms designer might
    		/// not be able to load this method if it was changed manually.
    		/// </summary>
    		private void InitializeComponent() {
    			// 
    			// Form1
    			// 
    			this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
    			this.ClientSize = new System.Drawing.Size(592, 516);
    			this.Name = "Form1";
    			this.Text = "Form1";
    		}
    		#endregion
    		
    		[STAThread]
    		static void Main()
            {
                Application.EnableVisualStyles();
                Application.EnableRTLMirroring();
                Application.Run(new Form1());
            }
    		
    	}
    }
    Well that is what I got now and this is the new error I get...

    'System.Windows.Forms.Applications' does not contain a definition for 'EnableRTLMirroring'(CS0117)

  7. #7
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Oops sorry I pulled that method from a version 2 project, Just make it:
    Code:
    [STAThread]
            static void Main()
            {
                Application.Run(new Form1());
            }
    And see if that works.

  8. #8
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    alright going good now! Now the ONLY program I have is, is there a way to have it so the consol window in the background doesn't show up?

    And yes the exe was created and it compiled no errors now.

  9. #9
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    ...there shouldn't be a console window. How did you create the project? It should be compiled as a Windows Application, not a Windows Console Application.

  10. #10
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Well I don't know, I just get error after error using #devolope. I added a trackbar and I got an error. I add one anouther thing, I get an error.

    I don't think I can use this #develope.

    Thanks for your help though!


    Edit: and the colnsol window window is the window that made the windows form.

  11. #11
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    I just downloaded the latest version of SharpDevelop from http://prdownloads.sourceforge.net/s...irror=optusnet, version 1.0.3 and it works fine for me. This is what I did:

    1. SharpDevelop starts and I go to "File->New->Combine...".
    2. Make sure the C# folder is seleted in the Categories box on the left, and in the Templates box select "Windows Application". Give it a name and press Create.
    3. Press the start button to compile. Application runs fine.

    I was able to add controls to the form easily with no hassles.

    I've attatched a visual guide. Hope this helps and you are able to get it working!
    Attached Images Attached Images  

  12. #12
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    After reading my last post I realised the picture may have seemed a little offensive, I hope you know it wasn't meant that way, I really posted it to try and help a fellow .NETTER.

  13. #13
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    what the heck! My #develope is different and I got it from the same place and same version!

    I'm going to do a complete reinstall and I hope that works.


    Edit: And I am wondering, why do you see that offensive?
    Last edited by Rune Hunter; 02-28-2005 at 03:27 PM.

  14. #14
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    I'm going to do a complete reinstall and I hope that works.
    I hope you're kidding...

  15. #15
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    hmm I must have had a bad version or somthing. It works wonderful now!

    Thank you sooooooooooooooooooooo much. I can't begin to thank you enough!

    Thanks to you I can now make programs that most people can run!

    but one question remains... does it use .net 1.1 and most people have .net 1.1 right?

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what type of language(s) are used to develope games?
    By CwannaB in forum Game Programming
    Replies: 16
    Last Post: 03-08-2003, 02:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21