HostsFile Properties | MSBuild Extension Pack Help 4.0.12.0 |
The HostsFile type exposes the following members.
Properties
Name | Description | |
---|---|---|
Comment |
The comment after the hosts entry. Only used by the SetHostEntry task action.
|
|
HostEntries |
The list of hosts entries. The identity should be the host name. The IP address should be in the IPAddress
metadata. A comment about the entry should be in the Comment metadata. The task will fail if the identity or
IPAddress metadata are empty.
|
|
HostName |
The hostname to alias. Only used by the SetHostEntry task action.
|
|
IPAddress |
The IP address for the hosts entry being aliased. Required. Only used by the SetHostEntry task action.
|
|
PathToHostsFile |
The path to the hosts file to update. Defaults to %SYSTEMROOT%\system32\drivers\etc\hosts. Task will fail
if this file doesn't exist.
|
|
Truncate |
If True, any host entry not in the HostEntries item group will be removed from the hosts file. Default is
False. Only used by the Update task action.
|
See Also