Quantcast
Channel: Dotnet/C# – Xinyustudio
Viewing all articles
Browse latest Browse all 204

Conditional postbuild in C#

$
0
0

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:

Public property

  • $(Collection) Returns the collection containing the Configuration object supporting this property.
  • Public property$(ConfigurationName) Gets the project configuration to be built.
  • Public property$(DTE) Gets the top-level extensibility object.
  • Public property$(Extender) Returns the requested Extender if it is available for this object.
  • Public property$(ExtenderCATID) Gets the Extender category ID (CATID) for the object.
  • Public property$(ExtenderNames) Gets a list of available Extenders for the object.
  • Public property$(IsBuildable) Gets whether the project or project item configuration can be built.
  • Public property$(IsDeployable) Gets whether the project or project item configuration can be deployed.
  • Public property$(IsRunable) Returns whether the project or project item configuration can be run.
  • Public property$(Object) Gets an object that can be accessed by name at run time.
  • Public property$(OutputGroups) Gets a collection of OutputGroup objects that contains the names of the files that are outputs for the project.
  • Public property$(Owner) Gets the project or project item for the configuration.
  • Public property$(PlatformName) Gets the name of the platform supported by this assignment.
  • Public property$(Properties) Gets a collection of all properties that pertain to the Configuration object.
  • Public property$(Type) Gets a constant indicating the object type.

For more details, refer to here .


Filed under: Dotnet/C#

Viewing all articles
Browse latest Browse all 204

Trending Articles