D
D
divanikus2012-12-27 19:47:41
C++ / C#
divanikus, 2012-12-27 19:47:41

Project Local Environment in MSVS

Please tell me how you solve the following question.
For development, Visual Studio 2010 or WinSDK 7.1 is used (i.e. only compilers without an environment). It is necessary for each project to create an easily portable local environment.

Those. let's say Qt4 is used for development, but there are old projects, but still alive, using Qt3. Both libraries use the same QTDIR environment variable. If we need to use ia32 and x64 builds at the same time, things get even more complicated. Each time to edit the environment of the machine is inconvenient. Editing project configurations (vcxproj) when moving from machine to machine is also unacceptable.

I would like some elegant solution, such as a local file with project settings, at best, per configuration. In previous versions of the studio, it was possible to use pluggable Property Sheets (vsprops files), although developers often forget to connect them ... In general, somehow it’s not much more convenient.

In general, if you have experience of similar solutions, please share :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
Fahrenheit, 2012-12-27
@Fahrenheit

Property Sheets - this is exactly the recommended solution, it allows you to very flexibly customize project parameters (and thanks to the possibility of inheritance, minimal duplication of settings is obtained).
They work fine in both VS10 and VS2012

P
Pavel Sysolyatin, 2012-12-28
@PSyton

1. The dumbest option, in my opinion, is to make several *.bat files with different environment variables for MSVC. In the case of running VS itself, devenv has the necessary command line options. If the assembly comes from the command line using msbuild, then he also knows how to do everything that is needed. In the projects themselves, in the settings, you just need to use the set environment variables.
2. Another option is Property Sheets, as mentioned earlier. Given that they support inheritance and the ability to define their own macros, you can do anything in them. What is not very convenient with them is the increase in the number of configurations.

T
tbd, 2012-12-29
@tbd

inside vcxproj files are in msbuild format
to set various conditions, you can use Conditional Constructs + Import Element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question