views:

602

answers:

3

I have a .NET project that for some reason gets stuck in debug mode. I've changed the compile mode from debug to release in the toolbar, but my project ends up in the debug directory anyway. Seems like VS is not updating the SLN file or something. Please help!

The reason I am asking about this is because it seems that there are weak references "ENCList" clogging up memory when my program runs, and they seem to be created when .NET apps are compiled in debug (or so says other sources I've found online).

-Mark

+1  A: 

Go to Configuration Manager in the dropdown list, set the Active solution configuration to Release, and make sure that the project's configuration is also Release.

Also, go to project properties, and check the output folder in release mode.

Also, click Build, Clean Solution, then Build, Build Solution.

Depending on your problem, these may or may not help.

SLaks
A: 

I would add to the above that if you have multiple projects in the solution, say class libraries, you may need to clean and rebuild each one of those projects individually in addition to cleaning the solution.

Took me a few hours to figure that out at the time.

Lill Lansey
A: 

I have seen this too.. Looks like a bug to me.

I hope that VS2010 will behave differentially.

Gilad