Disable the [] Clean output directory
checkbox on the NuGet Pack
step.
I had this issue where I set the target directory for the Nuget pack step to be the same folder as the .csproj
file I was building from.
With the tickbox ticked, it wiped the entire directory immediatly after checking it out.