Conditionally include file based on project configuration

I have a number of project releases for which I am creating a Visual Studio installation project (installer).

There is a separate license agreement for each release, which should be displayed in the License Agreement window by default.

What I want to do is to indicate LicenseFilethe license agreement window for the file somewhere on the client FS.

But the license file itself should be conditionally included in the installation package based on the conditional compilation symbol (EDITION_FREE, EDITION_GOLD, etc.) or just the configuration name.

Not sure how I will do this and what conditions are available for the property Conditionfor files?

Thank you
Dmitry.

+3
source share
1 answer

You can create separate versions of the same file with different extensions. Suppose your license file is License.txt, so you will need to create a few more, one for each configuration and give them the following names:

License.free.txt

License.gold.txt etc.

Then you need to create the assembly configuration with the same name as the file suffix (free, gold), and use this-like after the build script. Take a look at this question .

+1
source

Source: https://habr.com/ru/post/1738579/


All Articles