Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Built with optimizations enabled or without debug information

I'm currently trying to find out why my InjectableAttributes never get to the filter part.
Therefor I linked in the source project directly so I could easily put breakpoints etc.
When I build however I get the following message:

The following module was built either with optimizations enabled or without debug information: 
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\[a bunch of randomly named directories]\assembly\[more random names]\MvcTurbine.Web.DLL]

To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.

I checked the project's properties. It's configuration is set to "Active(Debug)" and the "Optimize code" check box is unchecked.

UPDATE
I checked again if I didn't by accident include the file rather then the project, but the references seem correct.
Just to be sure I also removed all existing bins so that all libraries are definitely rebuild somewhere, but to no avail.

UPDATE
In the advanced Build window the Debug output is set to Full and all options are identical to projects that are building debug info.
The config manager shows that the project is being built and has the exact same settings as all the other options.

UPDATE
In the Debug->Windows-Modules window the symbol status for the turbine library is PDB file does not match image I removed all corresponding pdb files on my entire system to make sure it gets re-generated, but to no avail.
To make sure I also searched for the dll on my entire system and removed them. Nothing.

What can be preventing VS from creating debug information?

like image 870
Boris Callens Avatar asked Dec 23 '09 13:12

Boris Callens


People also ask

What does optimize code do in Visual Studio?

The Optimize option enables or disables optimizations performed by the compiler to make your output file smaller, faster, and more efficient.

How do I turn off optimization in Visual Studio?

Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > C/C++ > Optimization property page. Modify the Optimization property.


1 Answers

I've just experienced the same problem this morning, using VS2010. I solved it by deleting all the build artefacts, e.g. executables, libraries, PDBs, etc. This was in \bin\Debug, \bin\Release, \obj\Debug, and \obj\Release (including sub-folders). Then I recompiled the debug configuration, and was back in business.

like image 100
HTTP 410 Avatar answered Oct 10 '22 16:10

HTTP 410