Archived

This forum has been archived. Please start a new discussion on GitHub.

Traditional DLL being loaded by .NET DLL - Unable to Find dependencies

I have added the message & stack trace to this. We have written a standard MFC DLL, and we have added ZeroC Ice to this DLL. We want to have a .NET DLL (written in C++) to load this "normal" DLL, and be used by our application. But we get message below. I have removed all the "ice" pieces (just two classes) and everything then works correctly. Any ideas would be greatly appreciated.


ex->Message "File or assembly name SA3StrategyNETD.dll, or one of its dependencies, was not found." String*


ex->StackTrace " at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at CStrategyLoader.LoadStrategyAssemblies(CStrategyLoader* ) in c:\bwcode\workspace\bwtakeout_mainline\bwt\takeout\takeoutcmnapi\strategyloader.cpp:line 83"
String*

Matthew

Comments

  • Hi Matthew,

    looking at the stack trace, as you can see, there is nothing Ice related in there at all. Also, Ice has no dependencies on the dll you are mentioning.

    I suspect that, with the Ice pieces you removed, you may have also removed the crucial bit of code that causes the dependency, probably because the Ice pieces you removed either contained application code, or a header file that forces the dll to be dragged in.

    At any rate, I don't think you problem has anything to do with Ice.

    Cheers,

    Michi.
  • But even if I remove all my code that uses the ICE, and just leave the refernce to <ice/ice.h> in my stdafx.h & keep the linker inputs of iced.lib & iceutild.lib, I get the same error (If I remove those last 3 bits, then everything works fine).
  • FORGET IT! I found the error, a batch file was changing my path of my system under me. Devils in the details. Thanks again for the help. :D