COM->.net Assembly Binding: "Cannot find the assembly..."



I'm trying to call a .net DLL from within the VB6 IDE. The DLL is strongly
named and not being installed in the GAC. To get around that, I'm
registering it with CODEBASE. In production, all apps and components are in
the same folder, so I don't have this issue. In development, the code lives
in a very different structure, thus requiring CODEBASE.

Cannot find the assembly HPFS_FSTI, Version=1.2.0.0, Culture=neutral,
PublicKeyToken=809fe79d5f400e68

I am including two log entries. Strangely, the first entry shows that the
DLL is being located initially. The second entry is from when I'm making
calls into the DLL.

In my mind, this first log entry proves that the CODEBASE option is working,
as it locates the DLL, even though it's not a sub folder of the VB98 folder.
Unfortunately, I don't know enough about these logs to see if there are any
clues in them as to how I can solve this issue.

Listing 1: Initial log entry
successful ----------------------------------------------

*** Assembly Binder Log Entry (12/5/2005 @ 3:43:24 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable C:\Program Files\Microsoft Visual
Studio\VB98\vb6.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: Where-ref bind. Location =
G:/2.6_Patch/Pegasus/Development/Apps/HPFS_FSTI/bin/hpfs_fsti.dll
LOG: Appbase = C:\Program Files\Microsoft Visual Studio\VB98\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===

LOG: Processing DEVPATH.
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///G:/2.6_Patch/Pegasus/Development/Apps/HPFS_FSTI/bin/hpfs_fsti.dll.
LOG: Assembly download was successful. Attempting setup of file:
G:\2.6_Patch\Pegasus\Development\Apps\HPFS_FSTI\bin\hpfs_fsti.dll
LOG: Entering run-from-source setup phase.



Listing 2: Failed call to DLL ----------------------------------------------

*** Assembly Binder Log Entry (12/5/2005 @ 3:43:26 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable C:\Program Files\Microsoft Visual
Studio\VB98\vb6.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = HPFS_FSTI, Version=1.2.0.0, Culture=neutral,
PublicKeyToken=809fe79d5f400e68
(Fully-specified)
LOG: Appbase = C:\Program Files\Microsoft Visual Studio\VB98\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===

LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: HPFS_FSTI, Version=1.2.0.0, Culture=neutral,
PublicKeyToken=809fe79d5f400e68
LOG: Cache Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio/VB98/HPFS_FSTI.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio/VB98/HPFS_FSTI/HPFS_FSTI.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio/VB98/HPFS_FSTI.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio/VB98/HPFS_FSTI/HPFS_FSTI.EXE.
LOG: All probing URLs attempted and failed.








.



Relevant Pages

  • Re: Check If COM Reference Available on Machine
    ... meant late bind not early bind. ... "Bob Phillips" wrote in message ... > create an object when the dll is not there. ... >> Once I get to the second workbook, it's too late to call CreateObject ...
    (microsoft.public.excel.programming)
  • RE: Where has WMSDefines Gone in SP2???????
    ... Are you able to compile fine? ... I get "Could not bind to dependency interop_msxml.dll" ... Microsoft.WindowsMediaServices.dll as a reference to my VS project. ... that is using the previous version of the mentioned DLL. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: error message from OLEView
    ... to open (Bind To File function) the DLL. ... there is an error message. ... From that file open dialog select your dll and you should be able to browse your type library. ... Never used BindToObject but I would expect that it tries to bind to some persisted state of a COM object, not to open its type library, if that is what you want to do. ...
    (microsoft.public.vc.language)
  • How to link and bind C/C++ under z/OS
    ... Does anybody know how to link and bind a source file with import file ... DLL and IMPORT file, but I don't know how to bind them. ... I don't find any information on IBM web site. ...
    (bit.listserv.ibm-main)
  • Re: Logging from a .dll
    ... But my logging method (which just uses the Trace class) is in the .exe ... So how would I write log entry from the .dll using a method in the .exe? ... I set up a method in the .exe to write to the trace file, but to append basic information like DateTime.Now to each log entry. ...
    (microsoft.public.dotnet.general)