R
R
Roman Rakzin2016-11-05 21:22:10
visual studio
Roman Rakzin, 2016-11-05 21:22:10

How to substitute parameter values ​​from a file before compilation?

I would like to automate the following process. There are, say, 5 applications whose parameters can change before compilation.
For example, I write the ServerIp parameter to the file and I want that when building each of the projects, the ServerIp value is taken from that file, so that I would not write the parameter in each of the assemblies.
And yet, it would not be bad to recompile all projects with one command at once.
How to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
15432, 2016-11-05
@15432

In C++, this is done with header files.
Some config_values.h is created, in which the same #define SERVER_IP "192.168.1.1" is entered.
Then it is embedded in all projects.
In C#, it seems that it is also possible, only as a separate class (not sure how exactly)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question