CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

The following module was built either with optimizations enabled or without debug information

Posted by CJ on January 4, 2008

I recently came across this error when trying to debug a framework .dll that I have been working on. A number of forums/blogs pointed me to disable debugging which isn’t a solution
“In Tools — Options — under debugging, uncheck the “enable just my code(managed only”

The fix for me was really straight forward. The .dll has a Strong Name Key (.snk) so it can be installed in the GAC. The latest version of the .dll that you want to debug must be installed in the GAC. Once this was complete I could then step into my framework code :)

10 Responses to “The following module was built either with optimizations enabled or without debug information”

  1. David said

    How did you specifically do this?

  2. CJ said

    Hi David
    In my case I completed the following steps.
    1/ Rebuild your VS.Net project
    2/ Copy the assembly (.dll) into the GAC (c:\windows\assembly)
    You need a Strong Name Key (.snk) so your assembly can be registered in the GAC. This can be created inside visual studio in the project properties.
    3/ Set a break point in your code and run up the project to hit your break point. Then you can step through your code and into the GAC assembly.

    Hope this helps
    CJ

  3. Red Bug said

    Thanks. A co-worker signed the dll to use with sharepoint. Your post solved my problem.

  4. LS said

    THANK YOU!! Your post solved my problem. Tried several options on other websites – tried them all.

    The original assembly (with a Strong Name) was written in VS 2003 and it was converted to VS 2005. Debugging was only possible if I GAC-ed the rebuilt assembly.

  5. hello it is test. WinRAR provides the full RAR and ZIP file support, can decompress CAB, GZIP, ACE and other archive formats.
    hwluluzexymuggoljnvipcrpvblztakwoofhello

  6. HelpmeOut said

    I am trying to debug the windows service and I am getting the above error..Pls help

  7. Terry said

    Your post helped me, too. Thank you!

  8. CyDev said

    What does the acronym “GAC” mean? Anyone, anyone. Bueller, bueller. No, seriously what does it mean? I am getting this error and I am still learning Visual Studio. Any help would be appreciated. Thanks.

  9. Viktor said

    It means Global Assembly Cache…I think..

  10. mert susur said

    GAC means global assembly cache and it is located in [WINDOWS DIR]\Assembly
    adding an assembly to GAC means, simply copy your assembly to the GAC directory which I mentioned up above.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>