none
Unable to load DLL 'SomeUnmanaged.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) RRS feed

  • Question

  • I had a project developed in Visual Studio 2008. Now I switched to Visual Studio 2010. It runs fine on the development PC. But once I tried to execute the binaries on an XP system with .net framework 4.0 [not having visual studio installed], the above exception was thrown. The unmanaged DLLs are not loaded but the managed ones are loaded.


    • Moved by Andrew.Wu Monday, June 20, 2011 6:03 AM (From:Visual Studio Setup and Installation)
    Friday, June 17, 2011 1:09 PM

Answers

  • Hi,

    According to your description, I just have a simple question to confirm with you.

    Have you placed the unmanaged assembly in correct folder?

    It seems that the application could not find the unmanaged dll, so it could not be loaded.

    Another possible root cause is the platform option that you compiled the unmanaged dll with. May I know the OS of development PC? It is Winows XP the same as target machine or other OS(32bit or 64 bit)? And the platform option?

    I suggest you build the dlls and application both with X86 option, so it will run both on 32-bit OS and 64-bit OS.

    Thank you for your posting and understanding.

     


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Paul Zhou Friday, June 24, 2011 6:00 AM
    • Marked as answer by Paul Zhou Monday, June 27, 2011 7:53 AM
    Monday, June 20, 2011 7:22 AM
  • Dear All, Thank you for your responses I sorted out the problem. Actually I had not replaced the msvcp90.dll and msvcr100.dll with msvcp100.dll and msvcr100.dll respectively. Thank you all!

    Friday, June 24, 2011 11:23 AM

All replies

  • Some clarification from you, please.

    What kind of project, and which programming language? I'll assume you opened the VS2008 project in VS2010 and ran the Upgrade Wizard. Were there any warnings or failed conversions? If so, please provide details.

    Did the converted project target the .NET Framework 4.0 Client Profile or the full .NET Framework 4.0? Does the target XP machine have the full 4.0 or the Client Profile?

    How did you deploy your application to the XP machine in question? Deployment project, ClickOnce, etc.?

     

     

     


    Friday, June 17, 2011 1:31 PM
  • Thank you for your prompt response.
    1. It contains mostly WPF  projects and a few  unmanaged C++ modules developed in VS2008.
    2. It uses DllImport in C# code to load C++ DLLs.
    3. There were no warnings and errors in conversion to VS2010.
    4. The converted project targets full .NET Framework 4.0.
    5. I copied the Release folder to the target machine.[This runs fine on a machine with VS2010.]
    6. The WPF modules are loaded successfully but the C++ ones are not.
    The target machine has the .NET Framework 4.0 Standalone version.

    Saturday, June 18, 2011 7:51 AM
  • Hi Ummar Muhammad,

    I'm going to help move your post to the Common Language Runtime forum for better support.

    Thanks for your understanding.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 20, 2011 6:02 AM
  • Hi,

    According to your description, I just have a simple question to confirm with you.

    Have you placed the unmanaged assembly in correct folder?

    It seems that the application could not find the unmanaged dll, so it could not be loaded.

    Another possible root cause is the platform option that you compiled the unmanaged dll with. May I know the OS of development PC? It is Winows XP the same as target machine or other OS(32bit or 64 bit)? And the platform option?

    I suggest you build the dlls and application both with X86 option, so it will run both on 32-bit OS and 64-bit OS.

    Thank you for your posting and understanding.

     


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Paul Zhou Friday, June 24, 2011 6:00 AM
    • Marked as answer by Paul Zhou Monday, June 27, 2011 7:53 AM
    Monday, June 20, 2011 7:22 AM
  • We do have similar issue - it might be related. DLL works on some machines while on other it throws same 0x8007007E error. Link to thread in x64 section 

    Cheers,
    Sami
    Nimi projects


    Nimi projects | Unconventional IT development since 8th August 2008
    Monday, June 20, 2011 3:58 PM
  • Did You tried to compile C++ modules in VS2010? What parameters are You using DLLImport with?

    Cheers,
    Sami


    Nimi projects | Unconventional IT development since 8th August 2008
    Monday, June 20, 2011 3:58 PM
  • Dear All, Thank you for your responses I sorted out the problem. Actually I had not replaced the msvcp90.dll and msvcr100.dll with msvcp100.dll and msvcr100.dll respectively. Thank you all!

    Friday, June 24, 2011 11:23 AM