Results 1 to 2 of 2

Thread: [2005]Please Help Appliaction reference problem

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    63

    Question [2005]Please Help Appliaction reference problem

    Hello to all,

    I am having a problem with references in VB 2005. I am creating an application that I have added some references. Though once I install the application and uninstall it it also removes the system refferences from VB2005.

    I have installed the application again and then the references show up in VB 2005 but now point to the install directory.

    All the machines I will be installing this application onto have the DLLs and TLB files and such that I need in a specific directory.

    How can I add a reference but not include it in the install so that it will look to an existing directory instead?

    Such as my application installs into C:\My_Application
    and the references are not installed but would look to C:\My_References

    Thanks for all you help with this.

    Mythos

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: [2005]Please Help Appliaction reference problem

    Typically, if the referenced dlls are not in the same directory as the executable, they must be in the GAC. You might be able to use Remoting to get around this.
    vb Code:
    1. Imports System.Runtime.Remoting
    2. ...
    3. 'create object reference to assembly
    4. Dim addOnAssembly As String = "..\My_References\mylib.dll"
    5. If Not IO.File.Exists(addOnAssembly) Then
    6.     Throw New System.IO.FileNotFoundException(addOnAssembly & "does not exist.")
    7. End If
    8. Dim handle As ObjectHandle = _
    9. Activator.CreateInstanceFrom(addOnAssembly, "myclassname")
    10. Dim processor As myclassname = DirectCast(handle.Unwrap(), myclassname)
    11. 'TODO: use processor methods

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