I would like to display a string that tells user which build configuration was used to build the application. For example:
If the command line resembled this:
msbuild project.sln /t:Build /p:Configuration=Release
And then in the source code, I would like to do this:
Console.Writeline("You are running the " + <get the /p:Configuration value> + " version" );
The user would see this:
You are running the Release version
I know that we can declare conditional compilation symbols (#defines) at the command prompt such as how it is defined in this article and this one. But I want to use the existing variable called Configuration
.