none
Probelm with interop .NET dlls in distributed client applications. RRS feed

  • General discussion


  • Hi,

    I have a .NET DLL (exposed for COM interop) migrated from a server into many client machines. This DLL is causing an Automation error 0x80070002 ("The system cannot find the file specified. ").

    The invoking VB dll is in the same folder as the .NET dll and is having a proper .tlb refernce made which is visible in Intellisense.

    I am quite confused why this error should popup as everything is fine with both the components. Even re-registering the component with regasm didn't help.

    But the interesting thing is that, it started working when I locally compiled the .NET component(using .NET 2005).

    Why does this happen? I cannot make out anything as both the binaries I have (the migrated ones and the locally compiled ones) are identical.

    Can anyone please provide an insight ?


    Regards, SP.
    Wednesday, February 25, 2009 11:58 AM

All replies

  • COM visible components must be deployed to the GAC.  The Regasm.exe /codebase option allows you to deploy it to a local folder instead.  Which isn't a really good idea considering the COM versioning problems.  Deploying to a network share is the something you shouldn't consider, drive mappings tend to be much too inconsistent to be reliable.
    Hans Passant.
    Wednesday, February 25, 2009 12:31 PM
    Moderator

  • Hans,

    Thanks for the update.

    I need to clarify that, its not on a network share but rather the dlls are deployed on to all the client machines from a server which builds these dlls.

    Can this be because of different architecture (OS) or frameworks exisiting in the build machine and the clients?

    Regards, SP.
    Wednesday, February 25, 2009 12:56 PM
  • Anything is possible, you haven't eliminated much with just a generic COM error.  Document your registration procedure and list the locations of the assemblies as well as the locations of their dependent assemblies and DLLs.
    Hans Passant.
    Wednesday, February 25, 2009 3:14 PM
    Moderator