Some Examples:
if “$(ConfigurationName)”==”Debug” “C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe” /i $(TargetPath)
- Do not put the “if clause” and the “action clause“ in seperate two lines
- Use “” if the command contains spaces, and if the command does not contain spaces, e.g. “SomeCommand” (not the “Some Command”, the quotation mark can be omitted;
- This is the same as above
if $(ConfigurationName)==”Debug” “C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe” /i $(TargetPath)
if “$(PlatformName)”==”x86″ “C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe” /i $(TargetPath)
Other variables:
- $(Collection) Returns the collection containing the Configuration object supporting this property.
$(ConfigurationName) Gets the project configuration to be built.
$(DTE) Gets the top-level extensibility object.
$(Extender) Returns the requested Extender if it is available for this object.
$(ExtenderCATID) Gets the Extender category ID (CATID) for the object.
$(ExtenderNames) Gets a list of available Extenders for the object.
$(IsBuildable) Gets whether the project or project item configuration can be built.
$(IsDeployable) Gets whether the project or project item configuration can be deployed.
$(IsRunable) Returns whether the project or project item configuration can be run.
$(Object) Gets an object that can be accessed by name at run time.
$(OutputGroups) Gets a collection of OutputGroup objects that contains the names of the files that are outputs for the project.
$(Owner) Gets the project or project item for the configuration.
$(PlatformName) Gets the name of the platform supported by this assignment.
$(Properties) Gets a collection of all properties that pertain to the Configuration object.
$(Type) Gets a constant indicating the object type.
For more details, refer to here .
Filed under: Dotnet/C#
