3

The property manager allows having different property sets for different configurations - for example, release and debug.

However, it still means you have to manually assign each property file to each configuration.

Is there some method to automatically assign a property set to a project based on some parameters (like configuration or platform)

a specific example: I have a solution with many sub-projects. this projects depend on various external libraries. for each external library I have a .props file with the relevant directories and other parameters (include , lib, dll's...)

In some cases the directory names can be easily constructed using the default macros such as $(Configuration), $(Platform), etc. However some libraries come with a less standard \ consistent naming convention. for these cases I create .props file which are specific to a configuration (Debug\Release) - but it requires assigning the manfully to each project, which is tedious and error prone.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Ophir Yoktan
  • 8,149
  • 7
  • 58
  • 106

2 Answers2

1

This is possible, at least in principle, see this post, for example. However, I did not find a practical way to use the whole power of MSBuild in combination with c++ projects from within the IDE. Whatever smart MSBuild expressions you write down in your property sheet, once you fire up the property manager dialog in the IDE everything gets overwritten with either defaults or the values inferred from there. This is an odd behaviour and completely different from other project types. Looks like they just wanted to keep the old pre-MSBuild style of editing VCProjects...

Community
  • 1
  • 1
Paul Michalik
  • 4,331
  • 16
  • 18
-1

You can record a macro and use VBA to create/generate these with a button click.

Oded
  • 489,969
  • 99
  • 883
  • 1,009