views:

1162

answers:

2

Visual Studio won't make a debug DLL when I select Debug for the configuration.

Instead it makes a release version. The output window show it's making a release version, even with a Debug configuration selected. The release DLL it produces has the current date.

When I save the project in the Debug configuration and reload it, it has magically switched to the Release configuration.

The project has been behaving for months, and this problem just started happening today.

What's going on, and how can I make it produce a debug DLL?

A: 

right click on the solution in the solution explorer, select properties, then click on Configuration, make sure the debug configuration has each sub project set to debug.

Neil N
+1  A: 

Your project build configuration is probably set to Release for the Debug solution configuration. Open the Configuration Manager (right click on solution, click "Configuration Manager..."). Select "Debug" as the active solution configuration and make sure all projects in the list have "Debug" selected as their configuration.

Chris Hynes
That was the problem: In the properties/Build tab there's a Configuration combo box, which I was using to "select" a debug build. This was misleading, and doesn't set the build type; the setting in the Configuration manager sets the build type. Thanks!