none
External program attached to debug not finding compiled dll RRS feed

  • Question

  • I have a class library project written in C# that extends a proprietary software.

    I have the software's executable attached to the debugger, and debugging my code when the process makes a call to my project was always ok. New projects were always forked from existing ones, so all configuration files were the same, i only change the GUID numbers.

    Now, i created a project from scratch, loaded all external references that i need to access the software's API and created an installer project inside the assembly to release the final version to production after the code is done. Nothing wrong until here.

    Problem is that the external software is not finding the compiled dll inside Debug folder of the project: when it's time for it to call the external reference, it throws me an error.
    Now if i install the library using the .msi installed generated through the Installer Project, it will work, but i loose debuging capabilities if i make any change to the code whatsoever.

    Example: I install the .msi with a certain breakpoint. I can load up the program through the debugger and hit that breakpoint no problem. In the modules window i can see that the symbols file have been loaded correctly, but the associated dll is located in the installation path of the installer project. Not the compiled dll inside debug path.
    If i change the code and add a new breakpoint, the debugger will fail to load any symbol files (if i try to load it manually using the modules window it will say that it did not found a matching image inside the folder) and will execute the old dll located in the installer path.

    It seems like i am missing a configuration somewhere that enables visual studio to expose my newly compiled dll, because if i uninstall the program (thus removing the old dll from my computer) the module simply won't load.

    Appreciate any help with this situation, thanks!

    Friday, October 11, 2019 4:50 PM

Answers

  • Configuration Found:

    "Register for COM interop" should be marked in Project Properties > Build , under the "Output" label.

    This will make the assembly visible to other COM processes.

    • Marked as answer by Knackfuss Monday, October 14, 2019 1:22 PM
    Friday, October 11, 2019 7:45 PM

All replies

  • Configuration Found:

    "Register for COM interop" should be marked in Project Properties > Build , under the "Output" label.

    This will make the assembly visible to other COM processes.

    • Marked as answer by Knackfuss Monday, October 14, 2019 1:22 PM
    Friday, October 11, 2019 7:45 PM
  • Hi Knackfuss,

    Thank you for posting here.

    Has your problem been solved? If so, please click "Mark as answer" to the appropriate answer, so that it will help other members to find the solution quickly if they face a similar issue.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 14, 2019 2:47 AM
    Moderator
  • yes, done.
    Monday, October 14, 2019 1:22 PM