0
votes

I get the above mentioned error when trying to add a breakpoint in a dll. I have tried all off the options mentioned here: Link

Background:

  1. I am using vs2013 community edition
  2. The class in the dll is static
  3. dll project is included in my solution I have tried to uncheck "enable just my code"
  4. The module windows reports that the symbols has been loaded.
  5. The dll's pdb file is located in the bin/debug folder where the exe is
  6. I have also tried to check "enable native code debugging"

When I enable "native code debugging" the modules window shows its trying to load the dll twice, first time it succeeds and the second time it fails. I have attached a screen shot of this.

Visual studio window

Is there anything I can try to fix this issue?

The following is a quick description of the projects in the solution.

  1. CustomAppInitioator - standalone app
  2. CustomCode - Test application for dll, I modify the program.cs to only start a form for each dll
  3. CustomCodeDLL - DLL project contain separate classes, eachsuing the namespace customcode.something, each class has its own .cs file
  4. CustomConnectorDLL - dll project for database
  5. CustomEmailDLL - DLL project for emails
  6. CustomIconsDLL - Empty dll project containing an public resource file for icons

Item 2 is the startup project, and I only include on the current test form item 3's class. So 1, 4-6 is not applicable here, I think....

3
are you certain that your dll project is build for the last time? - Mehdi Khademloo
Is this a Silverlight project by any chance? - slugster
Can you show the properties for the reference between your startup project CustomCode and CustomCodeDLL? Is CustomCode copying the reference through every time? - slugster
slugster, what do you mean the referance between the startup project and the dll? Do you want to see the main code? - blackwolfsa
Expand the references node of CustomCode in the solution explorer, right click on the CuctomCodeDLL reference, select Properties - what does it say? - slugster

3 Answers

0
votes

I looks like the dll is not up-to-date. Here are the steps how I always try to resolve it:

  • rebuild your solution and check the ddl created date in the output folder (usually 'bin') if its 'now'
  • if not now then you need to check the paths
  • you can also check if all your projects are set to 'Build' during the bild
  • check whether you reference the rigt dll/project in the Properties window.
0
votes

I think your dll project does not Build for the last time, you can Build manually this, or set this setting (for visual studio 2012-2013)

Tools -> Option -> Project And Solution -> Build And Run -> Then uncheck the "only build startup projects and dependencies on run"

0
votes

I found the problem. It was with the merging of dlls. Some of the class require their own dll's I merge all of this into one dll. If I remove this, I can debug in my dll.