Fixing 'Could not inject value for GitVersion' in Azure Pipelines

If you are using GitVersion with NUKE and you are trying to get the pipeline working, but are running into the build failing with Could not inject value for GitVersion.

I will assume you are using a YAML pipeline (and in my case I was pulling the sources from GitHub), try this.

First open the pipeline that is experiencing issues and go select ‘Edit’:

Screenshot of Azure Pipelines overview.

Select the additional settings that are collapsed and go to ‘Triggers’:

Expanded additional settings with Triggers highlighted