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 Clayton James 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 :)

About these ads

14 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.

  11. Optimus said

    2 years after the original thread… but this info might be helpful to others…
    I had the same error message regarding an external program I was running in Debug mode.
    The solution in my case was to remove the start action in the project properties (Debug tab), Rebuild the project, and finally put back my start action (Start external program in the Debug tab).

  12. Mitchy said

    Any way to solve this error without copying the dll to the GAC?

  13. Mike said

    I fixed this error by stopping IIS, closing visual studio and deleting the temporary asp.net contents located at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files. Just thought I’d throw that in the mix.

  14. I noticed a helpful idea not long ago on the way to generate income through securing precious metal gold markets. I believed it was useful because rare metal economy is definetly overflowing at present and incredibly nobody are in fact taking advantage of the following.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 26 other followers

%d bloggers like this: