0

I've set up my application release process on Jenkins CI. The build command is:

"c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" foo.sln /Rebuild "Release" /Out log.txt

The optimization flags (/LTCG /OPT:REF /OPT:ICF) are enabled in foo.sln.

When I development on my machine, I would like to disable those flags (so incremental build is available) in order to reduce the build time. My problem is I have to check out foo.sln from version control system (Perforce in my case), disable the flags. However, whenever I need to check in any changes to foo.sln, I have to toggle optimization flags before check-in and after submitted. So my local settings won't get checked in. Is there a way to make this process easier (avoid toggling the local settings)?

I found some similar questions on SO, but those are for Web.config/App.config. Not for foo.sln solution files.

Using different Web.config in development and production environment

How to select different app.config for several build configurations

Community
  • 1
  • 1
Stan
  • 37,207
  • 50
  • 124
  • 185

1 Answers1

1

A VS solution starts with two standard configurations, Debug and Release. If you need another one and Debug isn't good enough then just add it.

Use Build + Configuration Manager. Upper left combobox marked "Active Solution Configuration", pick "New". Give it a distinctive name and copy from Release. Change the settings you want to be different. Alter your build command accordingly.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536