Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Update *.nuspec
Update *.nuspec

Update *.nuspec

Denis Peshkov

|
1 install
| (0) | Free
Sync NuGet dependencies in *.nuspec with PackageReference versions from matching *.csproj files.
Get it free

Update *.nuspec

Pipeline task that scans a directory for *.nuspec files and updates the <dependencies> section from matching PackageReference entries in {id}.csproj (same behavior as the update-nuspec-action GitHub Action).

Usage

steps:
  - task: UseDotNet@2
    displayName: Use .NET 8 runtime
    inputs:
      packageType: runtime
      version: 8.0.x

  - task: UpdateNuspec@1
    displayName: Sync nuspec dependencies
    inputs:
      dir: '$(Build.SourcesDirectory)'
      dryRun: false

Inputs

Input Required Default Description
dir No $(Build.SourcesDirectory) Root folder to scan recursively for .nuspec / .csproj pairs
dryRun No false Report only; do not write files

Requirements

  • Agent: windows-latest or ubuntu-latest (bundled win-x64 / linux-x64 tool).
  • .NET: .NET 8 runtime on the agent (UseDotNet@2), framework-dependent publish.

Links

  • Repository
  • Issues
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft