#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2006
    Location
    IL, USA
    Posts
    584
    Rep Power
    21

    Class Library to .exe


    I have a class library VB.NET project that works exactly how I want it to. The only thing I want now is to have the program be able to be opened via an .exe for client use.

    How do I go about this, since I do not think that Class Library projects can be made into an .exe?

    I also need a way to be able to open the project via a command line and be able to read parameters; currently the project does not have any Main as it is not needed for a Class Library.

    I have attempted this before (by switching it into a Console Application) and adding a Main but that had failed me.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2006
    Location
    IL, USA
    Posts
    584
    Rep Power
    21
    Anyone have any tutorial or advice? I ask this because I have even tried changing the project to Console Application and building a Main yet the Main never executes. This happens even after building a "main" VB.NET module that just contains the Main(), yet that never fires too.
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,424
    Rep Power
    4539
    I haven't used VB since VB6, but with VB6 you could write a "wrapper" exe that encapsulated your class. You could also make an activex .exe rather than a .dll, but you'd do that if you needed your component to run in a different process.
    ======
    Doug G
    ======
    The man who doesn't read good books has no advantage over the man who can't read them.
    --Mark Twain
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2006
    Location
    IL, USA
    Posts
    584
    Rep Power
    21
    I somehow figured out how to do the .exe (or at least make a "Class Library" switch to "Console Application") though I run into a new problem.

    I have an RTD server running, or this is the RTD server and I wanted it to be a .exe for ease of the user when I publish the application. Though, what happens is usually when I hit debug Excel opens and then once Excel tries to access the RTD it will start up - it doesn't do this any more. It makes it seem as if the RTD is not registered with the COM for Excel to even know it is there.

    Any ideas?

IMN logo majestic logo threadwatch logo seochat tools logo