Macros for Build Commands and Properties
来源:互联网 发布:潭州教育python网盘 编辑:程序博客网 时间:2024/05/17 04:17
//z 2012-5-17 12:35:17 PM IS2120@CSDN
Pre:
IF NOT EXIST $(IntDir)..\..\lib mkdir $(IntDir)..\..\lib
Post:
copy $(IntDir)$(ProjectName).lib $(IntDir)..\..\lib
upx.exe $(OutDir)../xxx.dll
//z 2012-5-17 12:47:52 PM IS2120@CSDN
Add a call statement before all post-build commands that run .bat files. For example,call C:\MyFile.bat orcall C:\MyFile.bat call C:\MyFile2.bat.
Pre-build events do not run if the project is up to date and no build is triggered.
You can use a MSBuild task on your csproj, like that.
Edit your csproj file
<Target Name="AfterBuild"> <Copy SourceFiles="$(OutputPath)yourfiles" DestinationFolder="$(YourVariable)" ContinueOnError="true" /> </Target>
You can use these macros anywhere in a project's Property Pages dialog box where strings are accepted. These macros are not case sensitive.
$(RemoteMachine)
Set to the value of the Remote Machine property on the Debug property page. SeeChanging Project Settings for a C/C++ Debug Configuration for more information.
$(References)
A semicolon delimited list of references added to the project.
$(ConfigurationName)
The name of the current project configuration (for example, "Debug").
$(PlatformName)
The name of current project platform (for example, "Win32").
$(Inherit)
Specifies the order in which inherited properties appear in the command line composed by the project build system. By default, inherited properties appear at the end of the current property.1
$(NoInherit)
Causes any properties that would otherwise be inherited, to not be inherited. To also prevent evaluation at the sibling level, use$(StopEvaluating). The use of$(NoInherit) causes any occurrences of$(Inherit) to be ignored for the same property.1
$(StopEvaluating)
Immediately stops the evaluation of a macro in the evaluation chain. Any values that appear after$(StopEvaluating) will not appear in the evaluated value of the macro. If$(StopEvaluating) precedes$(Inherit), the inherited value at the current location in the evaluation chain will not be concatenated to the macro value.$(StopEvaluating) is a superset of the functionality of$(NoInherit).
$(ParentName)
Name of the item containing this project item. This will be the parent folder name, or project name.
$(RootNameSpace)
The namespace, if any, containing the application.
$(IntDir)
Path to the directory specified for intermediate files relative to the project directory. This resolves to the value for theIntermediate Directory property.
$(OutDir)
Path to the output file directory, relative to the project directory. This resolves to the value for theOutput Directory property.
$(DevEnvDir)
The installation directory of Visual Studio .NET (defined as drive + path); includes the trailing backslash '\'.
$(InputDir)
The directory of the input file (defined as drive + path); includes the trailing backslash '\'. If the project is the input, then this macro is equivalent to $(ProjectDir).
$(InputPath)
The absolute path name of the input file (defined as drive + path + base name + file extension). If the project is the input, then this macro is equivalent to $(ProjectPath).
$(InputName)
The base name of the input file. If the project is the input, then this macro is equivalent to $(ProjectName).
$(InputFileName)
The file name of the input file (defined as base name + file extension). If the project is the input, then this macro is equivalent to $(ProjectFileName).
$(InputExt)
The file extension of the input file. It includes the '.' before the file extension. If the project is the input, then this macro is equivalent to $(ProjectExt).
$(ProjectDir)
The directory of the project (defined as drive + path); includes the trailing backslash '\'.
$(ProjectPath)
The absolute path name of the project (defined as drive + path + base name + file extension).
$(ProjectName)
The base name of the project.
$(ProjectFileName)
The file name of the project (defined as base name + file extension).
$(ProjectExt)
The file extension of the project. It includes the '.' before the file extension.
$(SolutionDir)
The directory of the solution (defined as drive + path); includes the trailing backslash '\'.
$(SolutionPath)
The absolute path name of the solution (defined as drive + path + base name + file extension).
$(SolutionName)
The base name of the solution.
$(SolutionFileName)
The file name of the solution (defined as base name + 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 as drive + path); includes the trailing backslash '\'.
$(TargetPath)
The absolute path name of the primary output file for the build (defined as drive + path + base name + 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 + file extension).
$(TargetExt)
The file extension of the primary output file for the build. It includes the '.' before the file extension.
$(VSInstallDir)
The directory into which you installed Visual Studio .NET.
$(VCInstallDir)
The directory into which you installed Visual C++ .NET.
$(FrameworkDir)
The directory into which the .NET Framework was installed.
$(FrameworkVersion)
The version of the .NET Framework used by Visual Studio. Combined with $(FrameworkDir), the full path to the version of the .NET Framework use by Visual Studio.
$(FrameworkSDKDir)
The directory into which you installed the .NET Framework SDK. The .NET Framework SDK could have been installed as part of Visual Studio .NET or separately.
$(WebDeployPath)
The relative path from the web deployment root to where the project outputs belong. Returns the same value asRelativePath.
$(WebDeployRoot)
The absolute path to the location of <localhost>. For example, c:\inetpub\wwwroot.
$(SafeParentName)
The name of the immediate parent in valid name format. For example, a form is the parent of a .resx file.
$(SafeInputName)
The name of the file as a valid class name, minus file extension.
$(SafeRootNamespace)
The namespace name in which the project wizards will add code. This namespace name will only contain characters that would be permitted in a valid C++ identifier.
$(FxCopDir)
The path to the fxcop.cmd file. The fxcop.cmd file is not installed with all Visual C++ editions.
1. Use the Command Line Property Page for the property to see how properties are inherited. SeeSpecifying Project Settings with Property Pages for more information on property inheritance. SeeUsing $(Inherit) and $(NoInherit) for usage examples.
- VS2005 Macros for Build Commands and Properties
- Macros for Build Commands and Properties
- Macros for Build Commands and Properties
- Macros for Build Commands and Properties (zz)
- Macros for Build Commands and Properties
- Macros for Build Commands and Properties
- Macros for Build Commands and Properties for Visual Studio 2010
- 用于生成命令和属性的宏 Macros for Build Commands and Properties
- 【Xcode】 Multiple build commands for output file
- Warning: Multiple build commands for output file
- Warning: Multiple build commands for output file
- 警告: Multiple build commands for output file
- Warning: Multiple build commands for output file
- Multiple build commands for output file
- Multiple build commands for output file
- Multiple build commands for output file~~~~~~
- Customize vs 2010 build settings using visual studio's macros and customized macros
- Linux Commands for Beginners--which and whatis commands
- HTC美国区总裁称iPhone没那么酷了
- 软件测试流程
- png IDAT数据块还原问题
- 论坛盖楼抽奖活动总结
- NeHe OpenGL教程 第五课 3D图形
- Macros for Build Commands and Properties
- 周围的人都考研去了
- oracle优化
- 软件可靠性
- 内存碎片
- 使用ErrorStack进行错误跟踪及诊断
- C语言中,static的作用
- visual studio visual studio 2005 快捷键大全
- JsonCpp库使用