by Andreas

Visual Studio 2008/2010/2012 error: “The following module was built…”

I just encountered DAE #6 (Daily Annoying Error) when debugging an application:

The following module was built either with optimizations enabled or without debug information

image

This was in a solution with a couple of (signed) Sharepoint webparts, and even though I was attempting to debug a standalone command line app, the assembly in question was one of the webparts. Visual Studio seemed to believe that this code wasn’t “my code” (copyright infringement, anyone?), so by going to Tools –> Options –> Debugging –> General you can disable the “Enable Just My Code” option to fix the problem:

image

You might also want to look at other options, but at least this one worked for me this time.