I receive the error in the subject of this post whenever I try to run a web page in debug mode in VS 2005. This hasn't always happened - just on this one particular project that I've just created.
Both class libraries as well as the web site itself are set to Debug in the configuration, so I'm not sure why I'm getting this. Can anyone offer any guidance?
I have also faced the same problem on migrating the application .net 1.x to 2.0 and i solved by disabling the "Warn if no user code on launch" under the debugging option in the tools menu.
Tools --> Options --> Debugging --> General --> Enable Just my code (Managed only) --> un check "Warn if no user code on launch"
"The following module was built either with optimizations enabled or without debug information"
I encountered this problem in Visual Studio 2008 and like others here, my project settings did not have optimizations enabled and debugging information was configured. My problem turned out to be that the project assemblies stored in the GAC were from an
older build. I think when I started debugging, VS tried to map between the GAC assemblies and the new source and could not do so and threw up this message. Deleting my old assemblies from the GAC resolved my issue.
Hope this helps!
Jon
Visual studio 2005 2008 Debugging
Hope this helps!
Jon
If I was able to help, please mark this post as Answer.
It can happen even you dont use GAC. And can be solved by erasing previously compiled assemlies from Bin folders of your solution and rebuilding solution.
I have finally gotten to the bottom of this problem so i thought i should share my solution, after reading through hundreds of post, all of them hinting to my having built the offending assembly in Release mode or with the optimze flag checked.
I checked and the optimize flag for unchecked and my assembly was producing debug symbols but no joy
Unchecked the Just My Code flag in Tool->Options->Debugging, whilst that got rid of the message an allowed me to debug i could not fully debug as stepping into some routines did not work.
I even tried recreating the solution from scratch to try and pin down where the problem was occurring thinking that maybe this was to do with x86 or x64 builds, still no dice.
Finally i figured that maybe it was permissions as my web site folder was not under wwwroot, i tend to include my web site folder with the rest of my source under my solution folder, i added NETWORK SERVICE to my web sites folder security, compiled and ran
the solution and hey presto the message was gone and i was finally able to debug my solution without any problem.
Anyway, thought i would share in case this was driving anyone else insane.
Regards
Neil
[Edit]
In addition to the above i discovered another reason that this may occur, in one of my assemblies i had the following line in the AssemblyInfo.cs
Stop the ASP.NET Development web server Deleted the temporary files in following folder "c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\" clean the solution Rebuild it
russnem
Contributor
7001 Points
1389 Posts
ASPInsiders
MVP
The following module was built either with optimizations enabled or without debug information
Jun 05, 2006 11:49 PM|LINK
I receive the error in the subject of this post whenever I try to run a web page in debug mode in VS 2005. This hasn't always happened - just on this one particular project that I've just created.
Both class libraries as well as the web site itself are set to Debug in the configuration, so I'm not sure why I'm getting this. Can anyone offer any guidance?
Thanks,
Russ
Vijayeshw
Member
2 Points
1 Post
Re: The following module was built either with optimizations enabled or without debug information
Oct 17, 2007 09:11 AM|LINK
Hi,
I have also faced the same problem on migrating the application .net 1.x to 2.0 and i solved by disabling the "Warn if no user code on launch" under the debugging option in the tools menu.
Tools --> Options --> Debugging --> General --> Enable Just my code (Managed only) --> un check "Warn if no user code on launch"
JByrd2007
Member
447 Points
93 Posts
Re: The following module was built either with optimizations enabled or without debug information
Dec 12, 2008 02:00 PM|LINK
"The following module was built either with optimizations enabled or without debug information"
I encountered this problem in Visual Studio 2008 and like others here, my project settings did not have optimizations enabled and debugging information was configured. My problem turned out to be that the project assemblies stored in the GAC were from an older build. I think when I started debugging, VS tried to map between the GAC assemblies and the new source and could not do so and threw up this message. Deleting my old assemblies from the GAC resolved my issue.
Hope this helps!
Jon
Visual studio 2005 2008 Debugging
Jon
If I was able to help, please mark this post as Answer.
ankitavyas
Member
2 Points
6 Posts
Re: The following module was built either with optimizations enabled or without debug information
Feb 23, 2009 11:48 PM|LINK
Thanks mate. It solved my problem.
Really good.
ssat
Member
2 Points
1 Post
Re: The following module was built either with optimizations enabled or without debug information
Jul 21, 2009 08:28 AM|LINK
edersonbadec...
Member
2 Points
1 Post
Re: The following module was built either with optimizations enabled or without debug information
Feb 22, 2010 02:22 PM|LINK
I've had the same problem and to solve I've cleaned up the GAC and worked well
thanks
Asaf Shelly
Member
2 Points
1 Post
Re: The following module was built either with optimizations enabled or without debug information
Mar 28, 2010 06:11 AM|LINK
A version control tool updated only some of my files.
The solution was to find the application in the solution which uses the library as reference, delete the reference and add it again.
Asaf
http://AsyncOp.com
stevensn
Member
2 Points
1 Post
Re: The following module was built either with optimizations enabled or without debug information
Sep 23, 2010 08:45 PM|LINK
Hi
I have finally gotten to the bottom of this problem so i thought i should share my solution, after reading through hundreds of post, all of them hinting to my having built the offending assembly in Release mode or with the optimze flag checked.
I checked and the optimize flag for unchecked and my assembly was producing debug symbols but no joy
Unchecked the Just My Code flag in Tool->Options->Debugging, whilst that got rid of the message an allowed me to debug i could not fully debug as stepping into some routines did not work.
I even tried recreating the solution from scratch to try and pin down where the problem was occurring thinking that maybe this was to do with x86 or x64 builds, still no dice.
Finally i figured that maybe it was permissions as my web site folder was not under wwwroot, i tend to include my web site folder with the rest of my source under my solution folder, i added NETWORK SERVICE to my web sites folder security, compiled and ran the solution and hey presto the message was gone and i was finally able to debug my solution without any problem.
Anyway, thought i would share in case this was driving anyone else insane.
Regards
Neil
[Edit]
In addition to the above i discovered another reason that this may occur, in one of my assemblies i had the following line in the AssemblyInfo.cs
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
Removing this line fixed the problem as well, so i replaced the above with this
#if !DEBUG
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
#endif
Hope it helps
srinivask
Member
94 Points
35 Posts
Re: The following module was built either with optimizations enabled or without debug information
Sep 24, 2010 05:58 AM|LINK
http://skonakanchi.blogspot.com/
abul_shock
Member
12 Points
5 Posts
Re: The following module was built either with optimizations enabled or without debug information
Sep 24, 2010 09:49 AM|LINK
RESOLVED !!!
Hi.. i was getting the same error... I just cleaned up my project (Right click on Solution --> Clean solution) and rebuilt the whole solution.
The close the IDE and reopen again. The error went away!
Cheers,
Abul.
the following module was built either with optimizations