List of MSBuild built-in variables

前端 未结 6 799
春和景丽
春和景丽 2020-11-28 00:06

How can I get a list of built-in MSBuild variables?

I need to know how to determine the current project\'s csproj name, and thought it might be useful to know what e

相关标签:
6条回答
  • 2020-11-28 00:55

    I would also include a list of List of Common Properties and Parameters for MSBuild.

    Also, the properties depend on which version of MSBuild you are using. There are 3 versions.

    0 讨论(0)
  • 2020-11-28 00:57

    This seems like a pretty thorough list: Common macros for MSBuild commands and properties

    0 讨论(0)
  • 2020-11-28 01:01

    Comprehensive lists from MSDN:

    • MSBuild reserved properties
    • Common MSBuild properties
    • Macros for Build Commands and Properties

    Other useful lists:

    • Well-known item metadata
    • MSBuild special characters

    First link shows the MSBuild property for project name:

    MSBuildProjectName The file name of the project file without the file name extension

    0 讨论(0)
  • 2020-11-28 01:11

    These properties can also be defined by 3rd-party tools so to get the complete list I just use (in a C++ project for example): Properties -> Configuration Properties -> General -> then on the Output or Intermediate Directory drop down choose Edit... and you should see a list of all defined properties.

    0 讨论(0)
  • 2020-11-28 01:12

    There are also Agent and Build predefined variables for pipelines: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml. These are the variables I was looking for when I came across this article, so I thought I'd pass the link along when I finally found them.

    0 讨论(0)
  • 2020-11-28 01:13

    http://msdn.microsoft.com/en-us/library/c02as0cs(loband).aspx

    0 讨论(0)
提交回复
热议问题