Results 1 to 3 of 3

Thread: [RESOLVED] Commonly used functions help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2009
    Posts
    17

    Resolved [RESOLVED] Commonly used functions help

    I'm taking a class in VB, so I have numerous projects. I have a lot of useful functions and code, and I'd like for them to all be included in on piece of code that all my projects can use. The problem with DLLs is that when I build, the EXE needs the DLL to be in the same folder. I want a standalone EXE file. Is there any way I can have a DLL in a different folder than the EXE and still use it? Or is there some better solution to having useful code somewhere so when I update that code, it will affect all of my projects?

    Sorry if that was hard to read. It was hard to put it into words.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Commonly used functions help

    Why is it a problem to distribute the DLL with your EXEs? Most applications have DLLs they depend on. You can install your DLL in the Global Assembly Cache (GAC) so that multiple applications can use the one instance but you'd still have to distribute the DLL with every application.

    I guess your best option if you're determined to have a single EXE is to use the ILMerge tool from MS, which wil merge multiple assemblies into one. In that case you would build your DLL as normal, then reference it form your application as normal, but before you deploy you'd run ILMerge to create a single assembly and then deploy that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2009
    Posts
    17

    Re: Commonly used functions help

    well, I guess I can deal with 1 DLL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width