Thursday, May 19, 2011

Lesser Known MSBuild Properties

I was looking through the MSDN MSBuild Reference and I noticed that I could not find several built-in MSBuild properties that I was expecting to find.  In fact, I was only able to find these built-in MSBuild properties through using MSBuild Sidekick.  Since Visual Studio Intellisense does not assist with MSBuild properties, I thought I would list these properties here for anyone who may have a need for them in the future

The properties listed below are from using a sample MSBuild 4.0 project file:

  1. ALLUSERSPROFILE
  2. APPDATA
  3. CommonProgramFiles
  4. CommonProgramW6432
  5. COMPUTERNAME
  6. ComSpec
  7. DEFLOGDIR
  8. FP_NO_HOST_CHECK
  9. HOMEDRIVE
  10. HOMEPATH
  11. LOCALAPPDATA
  12. LOGONSERVER
  13. NUMBER_OF_PROCESSORS
  14. OS
  15. PATHEXT
  16. PROCESSOR_ARCHITECTURE
  17. PROCESSOR_ARCHITEW6432
  18. PROCESSOR_IDENTIFIER
  19. PROCESSOR_LEVEL
  20. PROCESSOR_REVISION
  21. ProgramData
  22. ProgramFiles
  23. ProgramW6432
  24. PSModulePath
  25. PUBLIC
  26. Registry
  27. SESSIONNAME
  28. SystemDrive
  29. SystemRoot
  30. TEMP
  31. TMP
  32. USERDNSDOMAIN
  33. USERDOMAIN
  34. USERNAME
  35. USERPROFILE
  36. VS100COMNTOOLS
  37. VSEDEFLOGDIR
  38. windir
  39. windows_tracing_flags
  40. windows_tracing_logfile
In addition, the following article provides some additional information on new Reserved Properties introduced with MSBuild 4:

No comments:

Post a Comment