Visual Studio Build Enviroment Variables (aka Property Sheet User Macro)

Here’s a howto for setting build environment variables within Visual Studio itself. Given that I’ve seen plenty of projects that used system wide environment variables for project level settings, I suspect this will be of use to other developers as well.

  1. From the menu: View > Other Windows > Property manager.
  2. Right click on Property Manager, add Property Sheet.
  3. Double click on the just created Property Sheet.
  4. Click on User Macros.
  5. Click Add Macro.
  6. Add the build variable’s name and value. Check “Set this macro as an environment variable in the build environment”.


  1. Thanks a bunch. I really didn’t want to have to make an environment variable on every machine I wanted to develop on. You learn new stuff every day.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>