Visual Studio Page Property Environment Variables

If you right-click on a project in the solution explorer and go to the "General" β†’ "Debugging" section, the "Environment" section will appear in which you must set the environment variables using the syntax NAME = VALUE. My problem is that if I try to create a new environment variable, it does not seem to work or will not be set. Does anyone have any experience? I just want to set the environment variable, so I can use it in the steps of the custom assembly, for example:

environment variable

LANGUAGE_VAR=en_us 

custom build step

 copy $(InputPath) $(outDir)\%LANGUAGE_VAR%\$(InputFileName) 

Something like that. This MSDN page is useful, but I can't get it to work: http://msdn.microsoft.com/en-us/library/ms173406.aspx#1

+4
source share
1 answer

In fact, what I found to be very useful for me was directed to Property Manager β†’ Select property pages that all my projects inherit from β†’ Double-click to open the property page editor β†’ Click β€œUser macros” β†’ Add macro and define it NAME and VALUE.

Now in my own build steps I can reference this macro.

So, if my macro was LANGUAGE = en_us, I can run the build and collect all the necessary en_us files. If I go back to the Property Manager and change the LANGUAGE value to es_es, then I can start the build and my build steps will get es_es instead of en_us. Hope this is not too embarrassing. Send me if you have this problem and I don’t know what I'm talking about.

+1
source

All Articles