[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
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:
Imports System.Runtime.Remoting
...
'create object reference to assembly
Dim addOnAssembly As String = "..\My_References\mylib.dll"
If Not IO.File.Exists(addOnAssembly) Then
Throw New System.IO.FileNotFoundException(addOnAssembly & "does not exist.")
End If
Dim handle As ObjectHandle = _
Activator.CreateInstanceFrom(addOnAssembly, "myclassname")
Dim processor As myclassname = DirectCast(handle.Unwrap(), myclassname)
'TODO: use processor methods