Azure Pipelines "##[error]Input required: <name>"
A task validated its inputs and found a required one missing. Either the input key is absent or misspelled in YAML, or an expression that should supply it resolved to an empty string.
What this error means
A task step fails immediately with ##[error]Input required: <inputName>, naming the input the task could not find.
##[error]Input required: pathToPublish
##[error]Unhandled: Input required: pathToPublishCommon causes
The required input is missing or misspelled
The inputs: map omits the key, or it is spelled or cased differently than the task expects, so the task sees no value.
An expression supplying the value is empty
A variable or parameter feeding the input resolved to an empty string, which the task treats as not provided.
How to fix it
Provide the input with the exact key
Add the required input under inputs: using the precise name and casing from the task reference.
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'Confirm any expression resolves to a value
- Echo the variable feeding the input to confirm it is not empty.
- Ensure the variable is defined before the task that consumes it.
- Quote the value so an empty result is visible rather than silently dropped.
How to prevent it
- Copy required input names from the task reference, including casing.
- Validate that variables feeding inputs are set before the task.
- Use the YAML editor task assistant to insert required inputs.