Using version 1.5.0.135
I thought I have done this several times before, but somehow it doesn’t work for me now.
1) Create a new project
2) Add project level variable (text or password, doesn’t matter) with a nuget token
3) Create a configuration with several stages and add a NuGet Push action:
Package: $Workspace$\Artifacts%ProjectName%.Core.%GitVersion_NuGetVersion%.nupkg
API Key: %NuGetToken%
Then I get this error:
NuGet Push [$Workspace$\Artifacts%ProjectName%.Core.%GitVersion_NuGetVersion%.nupkg] Show Expanded Name 7:24 PM 7:24 PM 0 milliseconds Failure
Action ‘NuGet Push [$Workspace$\Artifacts%ProjectName%.Core.%GitVersion_NuGetVersion%.nupkg]’ has failed due to an error.
Could not expand query ‘%NuGetToken%’. The expression ‘%NuGetToken%’ contains errors: Unknown Variable : NuGetToken
Can this be something with scoping? I have tried deleting and recreating the variable, but that didn’t work.
Bizarre, even when I replace all usages by actual guids, the error consists. Might this be caused by a copy/paste of an action?
I have deleted all the actions and re-added them, the fixed guids are now working. I think updating the token isn’t working correctly ATM.