While coding with VS 2005/2008 you may encounter with an exception that " The following module was built either with optimizations enabled or without debug information" .
To Resolve this, first thing you can do is enable full debug info on your project. to do this,
- Right Click the Project which is giving the exception and Go to Properties
- Under the Build tab go to the Advance option
- Set Debug Info to Full as shown below ,
If this doesnt resolve you problem,
Please remove all the project references from your project that gives this exception.
- Remove all files from the bin folder of your project.
- If bin folder file attributes are read only , remove the read only attributes on bin folder.
- Add the existing project references again
- Rebuild the project
This should resolve your problem.
#1 by Mike Polzin on October 23, 2009 - 12:34 am
Quote
Hi, thanks for this information, this issue was bothering me since I ported my project from VS2005 to VS2008. The second suggestion fixed up my project!
#2 by forex robot on February 5, 2010 - 5:11 pm
Quote
nice post. thanks.
#3 by Kris on February 25, 2010 - 12:01 am
Quote
Thanks. This solved my problem and I and able to debug thru my code now.
#4 by Pete on December 10, 2010 - 2:18 am
Quote
These suggestions did nothing to fix my issue, I still get the dialog on unit test run start and still cannot step into the source in debug mode on the module in question
#5 by Serge on March 2, 2011 - 12:57 pm
Quote
Fixed this by checking the references and bin and remove the yellow alerts.
#6 by John on July 6, 2011 - 1:11 pm
Quote
Nice one
#7 by Venkata Raman on July 9, 2012 - 4:58 pm
Quote
Thanks. This has helped me to resolve the issue
#8 by Henri on August 16, 2012 - 10:19 pm
Quote
Thank you, I knew the answer had to be simple, the GAC gag seemed a bit overboard.
#9 by Antroid on December 3, 2012 - 1:42 pm
Quote
THANKS A LOT! now i can debug my project! bye bro!