469,904 Members | 2,143 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

Resolving references used by a C# COM dll at runtime

I have a C# COM dll (using ComVisible, ClassInterface etc) and that dll has a
number of references (other custom dll's). For example MyComProj.dll,
MyComProjReference.dll which live in C:\MyAssemblies

I register the MyComProj.dll using regasm etc.

I can now instantiate the required COM object in this dll if I create a new
exe project that lives in the same folder that. However, I wish to use this
COM dll in a number of other programs, for example, Internet Explorer.

It appears that no matter what you do (gac, config files etc) the .NET
framework refuses to look ANYWHERE else apart from the application folder -
not even in the GAC!! Surely, I've missed something somewhere and support
for creating COM objects in C# is not this poor.

Below is the first error log (of a number of failures) from the Assembly
Binding log view:

*** Assembly Binder Log Entry (18/01/2008 @ 11:31:15) ***

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

Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msco rwks.dll
Running under executable C:\Program Files (x86)\Internet
Explorer\iexplore.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = MICL-NET\mnl
LOG: DisplayName = stdole, Version=7.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Internet Explorer/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = iexplore.exe
Calling assembly : MyComProj, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=24cc1a8168bea492.
===
LOG: Start binding of native image stdole, Version=7.0.3300.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
WRN: No matching native image found.
Jan 18 '08 #1
0 1216

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by JKop | last post: by
13 posts views Thread by placid | last post: by
3 posts views Thread by Matt | last post: by
1 post views Thread by Steve W | last post: by
3 posts views Thread by John Kotuby | last post: by
reply views Thread by =?Utf-8?B?TWlrZSBMYWZmZXJ0eQ==?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.