Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of MSBuild built-in variables

Tags:

msbuild

People also ask

How do I set properties in MSBuild?

MSBuild lets you set properties on the command line by using the -property (or -p) switch. These global property values override property values that are set in the project file. This includes environment properties, but does not include reserved properties, which cannot be changed.

How do I find MSBuild path?

For example, the path to MSBuild.exe installed with Visual Studio 2019 Community is C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe You can also use the following PowerShell module to locate MSBuild: vssetup. powershell.

Where are Visual Studio Environment Variables?

In Visual Studio 2019 right-click your project, choose Properties . In the project properties window, select the Debug tab. Then, under Environment variables change the value of your environment from Development to Production or other environments.

How do I view Environment Variables in Visual Studio?

In Visual Studio, we can set ASPNETCORE_ENVIRONMENT in the debug tab of project properties. Open project properties by right clicking on the project in the solution explorer and select Properties. This will open properties page. Click on Debug tab and you will see Environment Variables as shown below.


Comprehensive lists from Microsoft Docs (New Docs):

  • Common macros for MSBuild commands and properties

Comprehensive lists from MSDN (Legacy Docs):

  • 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


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


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.


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