Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. The unexplainable, a DllNotFoundException

The unexplainable, a DllNotFoundException

Scheduled Pinned Locked Moved C#
announcementcsharpc++debugginghelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dxben
    wrote on last edited by
    #1

    I'm having a very odd problem. I have a basic C# form app that pInvokes into a C++ dll. When I build my C++ dll and C# app in Release mode, the C# app can load the dll and call into it just fine. However if I build the solution in Debug mode, the C# app throws a DllNotFoundException. I've double checked and the C++ debug version of the dll is being properly copied into the C# app's bin/debug folder, so its actually there. Why is it able to load the release version and not the debug version?:mad:

    L 1 Reply Last reply
    0
    • D dxben

      I'm having a very odd problem. I have a basic C# form app that pInvokes into a C++ dll. When I build my C++ dll and C# app in Release mode, the C# app can load the dll and call into it just fine. However if I build the solution in Debug mode, the C# app throws a DllNotFoundException. I've double checked and the C++ debug version of the dll is being properly copied into the C# app's bin/debug folder, so its actually there. Why is it able to load the release version and not the debug version?:mad:

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      dxben wrote:

      I've double checked and the C++ debug version of the dll is being properly copied into the C# app's bin/debug folder, so its actually there.

      And the name of the debug dll is the same? xacc.ide-0.1 released! Download and screenshots

      D 1 Reply Last reply
      0
      • L leppie

        dxben wrote:

        I've double checked and the C++ debug version of the dll is being properly copied into the C# app's bin/debug folder, so its actually there.

        And the name of the debug dll is the same? xacc.ide-0.1 released! Download and screenshots

        D Offline
        D Offline
        dxben
        wrote on last edited by
        #3

        Yeah its the same. Actually someone else pointed out to me that my debug dll is probably dependent on the debug dll of the CRT and that it can't find it. So I need to make sure the debug DLL of CRT is in my path. What is the filename of the debug crt DLL?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups