Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
361 views
in Technique[技术] by (71.8m points)

c# - Pre and Post Build event parameters

In Visual Studio, can someone point me to a list of available pre- and post-build events parameters?
eg. $(TargetDir), etc.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This link provides the 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 CPU".

$(OutDir)
Path to the output file directory, relative to the project directory. This resolves to the value for the Output Directory property. It includes the trailing backslash ''.

$(DevEnvDir)
The installation directory of Visual Studio 2005 (defined with drive and path); includes the trailing backslash ''.

$(PlatformName)
The name of the currently targeted platform. For example, "AnyCPU".

$(ProjectDir)
The directory of the project (defined with drive and path); includes the trailing backslash ''.

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

$(ProjectName)
The base name of the project.

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

$(ProjectExt)
The file extension of the project. It includes the '.' before the file extension.

$(SolutionDir)
The directory of the solution (defined with drive and path); includes the trailing backslash ''.

$(SolutionPath)
The absolute path name of the solution (defined with drive, path, base name, and file extension).

$(SolutionName)
The base name of the solution.

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

$(SolutionExt)
The file extension of the solution. It includes the '.' before the file extension.

$(TargetDir)
The directory of the primary output file for the build (defined with drive and path). It includes the trailing backslash ''.

$(TargetPath)
The absolute path name of the primary output file for the build (defined with drive, path, base name, and file extension).

$(TargetName)
The base name of the primary output file for the build.

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...