So, both this and this are pretty clear. Simply pass /p:DefineConstants=\"SYMBOL\"
It doesn\'t work at all for me, even in a test project. I\'m expectin
It seems you are not passing conditional compilation symbol. That's why you are getting output as : No environment provided. Just go to project properties and than click on build tab (left side below application). you will find one box asking for conditional compilation symbol. Just write your constants as per your desired output. for ex. in your example, to print "DEV" write DEV at conditional compilation box and rebuild your project. i am sure it will work.
Note: if you want pass any symbol than as per your code it will print : No environment selected.