I have a C# project that I am building via the command line and I want to be able to pass a value into the build such that it is available at runtime.
For example, if my app has a label and I want the text for that label to be specifiable when calling msbuild, I would want to build it using a command, somthing like this:
MSBuild MyProject.sln /p:MyCustomText="blue"
And then access that value at run time to set the label text, something like this:
myLabel.text = MyCustomText
What's the best way of achieving this? There must be a way to do this without overcomplicating it with prebuild steps and / or custom .cs file generation.