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
David said
How did you specifically do this?
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
Red Bug said
Thanks. A co-worker signed the dll to use with sharepoint. Your post solved my problem.
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.
Vittercinfucoudge said
hello it is test. WinRAR provides the full RAR and ZIP file support, can decompress CAB, GZIP, ACE and other archive formats.
hwluluzexymuggoljnvipcrpvblztakwoofhello
HelpmeOut said
I am trying to debug the windows service and I am getting the above error..Pls help
Terry said
Your post helped me, too. Thank you!
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.
Viktor said
It means Global Assembly Cache…I think..
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.
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).
Mitchy said
Any way to solve this error without copying the dll to the GAC?
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.
how to invest in gold bullion said
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.