Cache nuget packages using pipeline caching (#32677)

This commit is contained in:
David Federman
2024-05-02 07:59:37 -07:00
committed by GitHub
parent 6bd9a70c29
commit ea5bf5dd0f

View File

@@ -83,6 +83,24 @@ steps:
- task: VisualStudioTestPlatformInstaller@1
displayName: Ensure VSTest Platform
- task: Cache@2
displayName: 'Cache nuget packages (PackageReference)'
inputs:
key: '"PackageReference" | "$(Agent.OS)" | Directory.Packages.props'
restoreKeys: |
"PackageReference" | "$(Agent.OS)"
"PackageReference"
path: $(NUGET_PACKAGES)
- task: Cache@2
displayName: 'Cache nuget packages (packages.config)'
inputs:
key: '"packages.config" | "$(Agent.OS)" | **/packages.config'
restoreKeys: |
"packages.config" | "$(Agent.OS)"
"packages.config"
path: packages
- ${{ if eq(parameters.enableCaching, true) }}:
- task: NuGetToolInstaller@1
displayName: Install NuGet