Re: Strange file not found exception



George, this error is a variant of your precedent message: you need to
indicate same architecture to all files in project and all DLLs and
Assemblies *must* reside in same directory.

Perhaps you need to change some final folders in solution or copy
files via post-build commands.

On Sun, 18 Jan 2009 05:44:04 -0800, George
<George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hello everyone,

I am writing a managed console application which will invoke native C++ COM
DLL on Windows Server 2003 x64 using PIA interop. The managed console
application is built for "Mixed Platform" debug version and the native COM
DLL is built for x64 debug version. I am using interop to invoke method from
managed code which are exposed from COM code.

I find creating a COM coclass object in managed code is ok, and it is also
ok to call some methods of COM coclass from managed code using the created
coclass object instance. But when I call into a specific method Abc (Abc is
implemented/exposed in COM DLL) from my managed code (FooImpl.dll), there is
exception like this, I am so confused that I did not write any method called
"XmlSerializers". Any ideas to debug further?

(FooImpl is my managed code DLL which will call COM native code, my managed
code console application linked with FooImpl.dll.)

--------------------
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in
FooImpl.dll

Additional information: Could not load file or assembly
'FooImpl.XmlSerializers, Version=1.0.1121.1, Culture=neutral,
PublicKeyToken=null' or one of its dependencies.

The system cannot find the file specified.
--------------------

regards,
George
Microsoft Visual C++ MVP
========================
Mi blog sobre programacion: http://geeks.ms/blogs/rfog
Momentos Leves: http://momentosleves.blogspot.com/
Cosas mias: http://rfog.blogsome.com/
Libros, ciencia ficcion y programacion [Acentos eliminados por encoding]
========================================
La dicha esta constituida por esos huecos cerebrales sin historia.
-- Manuel Vicent.
.



Relevant Pages

  • Re: Integrating with legacy code
    ... Removed nochkclr.obj as a linker input ... Extention DLL. ... access them from within the web service, ... >order to add managed code to it: ...
    (microsoft.public.dotnet.general)
  • Re: Managed Code From Unmanaged Code Issues On Vista
    ... All assemblies were installed ... on the Vista Machine with the "Real" Admin not the standard Administrator ... replicate the issue create a simple COM dll in C++ using ATL add a Simple ... System.Diagnostics.Debug.WriteLine in your managed code (remember ...
    (microsoft.public.dotnet.languages.vc)
  • Dependency walker msvcr80d.dll missing coredll.dll and dwmapi.dll
    ... I've completed migrating one of our company's C++ Managed Code ... The dll is written in MFC with sections of C++ ... The dll exports its objects in the same manner as any VS2005 Solution Wizard ... In fact when I peer into the dll with the DepedencyWalker app, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Error using P/Invoke with Winsock API using CF.NET
    ... You aren't going to be able to pass a callback function from managed code, ... It might be significantly easier to create a native DLL ... setting up the socket in secure mode, ... >>> public static extern int ioctlsocket(int s, uint controlCode, object ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: create a wrapped managed dll that can be used from pure unmanaged code
    ... > code which calls into managed code" and some of those unmanaged ... Exporting a class based interface from a DLL ... public void SayHello() ... GCHandle gch; ...
    (microsoft.public.dotnet.languages.vc)