0

The developers in the team often forget to switch to Release mode, so we often end up building in the wrong mode (Debug) -- taking a long time.

Really need to set the default build to Release.

3 Answers3

1

After some simple testing, I believe VS2008 follows this rule:

  • if a solution was in Release mode when the developer last closed it, then the next reopen would be in Release.
  • if a solution was in Debug mode when the developer last closed it, then the next reopen would be in Debug.

The last-used mode seems to be saved in the local *.suo file, and unrelated to the *.suo file on another developer's code directory.

If that's the case, is there something we can do in the code repository to set the solution to "always start in Release, unconditionally"? Perhaps check in the binary *.suo file but not a best practice.

0

under solution select properties and go to configuration and change it from debug to release:enter image description here

Proxytype
  • 712
  • 7
  • 18
  • Thanks. Not sure if that forces MSVS to always start in Release. I now suspect perhaps the last build before I close MSVS is remembered as the default build mode. – Bin TAN - Victor Jun 23 '15 at 10:03
  • starting project as release is not good idea, after change this configuration every build will be in the release – Proxytype Jun 23 '15 at 10:10
  • Thanks but what I need is a way to save my preference -- to always start this solution in Release mode, so we won't accidentally spend a long time building Debug. – Bin TAN - Victor Jun 23 '15 at 10:13
0

If you need to create a Release build to move to production, the ideal solution is to set up a build server to handle it. But either from a dev box or a server, you can create a batch file to compile a Release version of your code. This way you always get the correct build, regardless of what an individual developer has set on their box.

Community
  • 1
  • 1
Pedro
  • 12,032
  • 4
  • 32
  • 45