Command
New-ConfigurationDotNetState
Creates preserve/restore state options for DotNet publish targets.
Syntax
New-ConfigurationDotNetState [-ClearStorage <Boolean>] [-Enabled] [-OnMissingSource <Warn|Fail|Skip>] [-OnRestoreFailure <Warn|Fail|Skip>] [-Rules <DotNetPublishStateRule[]>] [-StoragePath <String>] [<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Create state preservation options
$rule = New-ConfigurationDotNetStateRule -SourcePath 'config.json' -Overwrite
New-ConfigurationDotNetState -Enabled -Rules $rule -StoragePath 'Artifacts/DotNetPublish/State/{target}/{rid}/{framework}/{style}'Parameters
- -ClearStorage Boolean
- Clears storage before preserving state.
- -Enabled SwitchParameter
- Enables state preservation.
- -OnMissingSource DotNetPublishPolicyMode
- Policy for missing source paths.
- Possible values:
Warn,Fail,Skip - -OnRestoreFailure DotNetPublishPolicyMode
- Policy for restore failures.
- Possible values:
Warn,Fail,Skip - -Rules DotNetPublishStateRule[]
- State rules.
- -StoragePath String
- Optional storage path template.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.