Results 1 to 3 of 3

Thread: [RESOLVED] [2008] Load DLL unknown version

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Resolved [RESOLVED] [2008] Load DLL unknown version

    Hello,

    I am trying something new for me, and I am not sure the best way to do it. I am working to create a dll that can access another dll and use its methods. The dll that I need to access will always have the same name and method, but not always the same version. Since it will be an unknown version, I don't think I can just create a reference and access it as usual. I thought about using reflection to load the assembly by name, without the version information, and I have taken some stabs at it, but haven't quite got it all worked out. Before I get too far I thought perhaps I should ask if reflection is the right way to go, or is there an easier way. Any advise I could get on this would be great.

    For clarification, I am using Visual Studio 2008, but am targeting the .NET 2.0 framework.

    Thank you.
    Ben


    Using Visual Basic 2005/2008

  2. #2
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: [2008] Load DLL unknown version

    Actually, what you'll want to do is the following:

    In VS, open the solution of your class library that will make up your dll. Right click references in the solution explorer, then browse to and add the other dll as a reference. When you highlight the new reference, under it's properties you'll be able to set Specific Version to false. Then, all you'll have to do when accessing the first dll is make sure that the dll it's referencing is in the same folder.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Re: [2008] Load DLL unknown version

    Cool. Thank you for that. I wasn't aware that could be done. That is a big help!
    Ben


    Using Visual Basic 2005/2008

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