views:

29

answers:

1

We have three servers for each mode:

  1. Development
  2. Testing
  3. Production

Each one of them has different settings for connecting to the database, different base paths for resource accessing etc. How do I create different debug and release modes for each of those server types and how do I force them to use a different configuration file?
Is there an easy way to switch between them?

+4  A: 

Right-click on project->properties->Configuration Manager.

To create solution profile("configuration"):
Click drop-down "Active Solution profiles", select edit.

To create project profile("configuration"):
In "project contexts" "grid", click on dropdown from "Configuration" column, select edit.

To select project profile for solution profile:
Select active solution configuration, then select desired project configurations for each project.

Each profile can have different settings - i.e. target path, include directories, etc, etc - basically everything you can set on property pages can be different for each profile.
They will use same file though.

SigTerm
What do you mean they will use the same file?
the_drow
@the_drow: I.e. project will always have same set of files (*.h, *.cpp, *.rc, etc) regardless of current profile - you can't add a file for a "debug" profile only. You still will be able to individually exclude files from build for every project profile, but they all will be listed in Solution Explorer.
SigTerm