Pre and Post Build Event Parameters

In Visual Studio, can anyone point me to a list of available event parameters before and after the build?
eg. $(TargetDir) etc.

+6
source share
2 answers

This link contains a complete and updated list. However, if it breaks, this answer will be lost.

Currently for VS 2015 we have:

$ (ConfigurationName)
The name of the current project configuration, for example, Debug | Any processor.

$ (OutDir)
The path to the output file directory relative to the project directory. This resolves the value for the Output Directory property. It includes a backslash "\".

$ (DevEnvDir)
Visual Studio 2005 installation directory (determined by disk and path); includes the backslash "\".

$ (PlatformName)
The name of the current target platform. For example, "AnyCPU".

$ (ProjectDir)
Project directory (determined using the disk and path); includes the backslash "\".

$ (ProjectPath)
The absolute name of the project path (defined using the drive, path, base name and file extension).

$ (ProjectName)
The base name of the project.

$ (ProjectFileName)
The name of the project file (with the base name and file extension).

$ (ProjectExt)
Project file extension. It includes '.' before file extension.

$ (SolutionDir)
Solution catalog (determined by disk and path); includes the backslash "\".

$ (SolutionPath)
The absolute name of the solution path (determined using the disk, path, base name and file extension).

$ (SolutionName)
The base name of the solution.

$ (SolutionFileName)
The name of the solution file (defined with the base name and file extension).

$ (SolutionExt)
File extension solution. It includes '.' before file extension.

$ (TargetDir)
The directory of the main output file for the assembly (determined using the disk and path). It includes a backslash "\".

$ (TargetPath)
The absolute path name for the main output file for the assembly (determined using the disk, path, database name, and file extension).

$ (Target_name)
The base name of the main output file for the assembly.

$ (TargetFileName)
The file name of the main output file for the assembly (defined as the base name and file extension).

$ (TargetExt)
The file extension of the main output file for the assembly. It includes '.' before file extension.

+4
source

Source: https://habr.com/ru/post/917103/


All Articles