Sets a number of properties with information about the system environment. The intent of this task is for nightly build logs to have a record of system information so that the build was performed on.
Property |
---|
<NAnt.Core.Tasks.SysInfoTask.Prefix >.clr.version |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.env.* |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.platform |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.version |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.applicationdata |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.commonapplicationdata |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.commonprogramfiles |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.desktopdirectory |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.programfiles |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.system |
<NAnt.Core.Tasks.SysInfoTask.Prefix >.os.folder.temp |
When the name of an environment variable contains characters that are not allowed in a property name, the task will use a property name where each of such characters is replaced with an underscore (_).
Moreover when the name of an environment variable ends with the string "(x86)" the name of the property that is defined by this task will end with ".x86" instead.
For example the environment variable "ProgramFiles(x86)" will become "sys.env.ProgramFiles.x86" but an environment variable named "Program(x86)Files" would become "sys.env.Program_x86_Files".
Function |
---|
NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem |
NAnt.Core.Functions.EnvironmentFunctions.GetFolderPath(System.Environment.SpecialFolder) |
NAnt.Core.Functions.EnvironmentFunctions.GetVariable(System.String) |
NAnt.Core.Functions.PathFunctions.GetTempPath |
NAnt.Core.Functions.EnvironmentFunctions.GetVersion |
Parameters
Attribute | Type | Description | Required |
---|---|---|---|
prefix | string |
The string to prefix the property names with. The default is "sys.".
|
False |
failonerror | bool |
Determines if task failure stops the build, or is just reported.
The default is
true .
|
False |
if | bool |
If
true then the task will be executed; otherwise,
skipped. The default is true .
|
False |
unless | bool |
Opposite of
NAnt.Core.Task.IfDefined . If false
then the task will be executed; otherwise, skipped. The default is
false .
|
False |
verbose | bool |
Determines whether the task should report detailed build log messages.
The default is
false .
|
False |
Examples
Register the properties with the default property prefix.
<sysinfo />
Register the properties without a prefix.
<sysinfo prefix="" />
Register properties and display a summary.
<sysinfo verbose="true" />
Requirements
- Assembly
- NAnt
.Core .dll - Namespace
-
NAnt
.Core .Tasks