Post-build event command line based on project variable

256 views Asked by At

I need to make a call to a batch file when I finish my project build.

I need to make different calls based on a variable in my c# project. How can I do? This is what I need:

AppHelper.cs
public enum CompilingDefines
{
    XNET,
    NOTIFIER
}
public static CompilingDefines CompiledFor { get; set; }

Differnt Build-event calls:

NOTIFIER version

call "$(TargetDir)CreaPacchettoNotifier.bat"

XNET version

call "$(TargetDir)CreaPacchettoXNet.bat"
1

There are 1 answers

2
Kris On

Assuming XNET and NOTIFIER are build configurations, you might as well use $(Configuration) and $(Platform)