Nuget Packages - Nuspec Package Reference Updater

Nuget Packages are add-ons that can be used inside .Net applications and extend your development experience with functionality
They are written with standard .Net Technology and can be Libraries or MS Build Extensions or Tools.

Nuspec Package Reference Updater

This package provides an MSBuild component specifically designed for .NET Core projects that automatically keeps your .nuspec file dependencies in perfect synchronization with your project's current PackageReference entries.

One of the most tedious and error-prone aspects of creating NuGet packages is maintaining the dependency list in your .nuspec file. Every time you add, update, or remove a package reference in your project, you traditionally need to manually mirror those changes in your .nuspec file. This manual process is time-consuming, easy to forget, and frequently leads to inconsistencies where your published NuGet package declares dependencies that don't match what your code actually requires.

Instead of manually copying dependencies from your .csproj files into your .nuspec file, this tool handles the entire process automatically. Whenever you add or update a PackageReference in your .NET Core project, the MSBuild task automatically detects the change and updates the corresponding dependencies section in your .nuspec file to match. Similarly, when you remove a package reference, it's automatically removed from the .nuspec file as well.

This automation ensures your .nuspec files stay up to date without any manual intervention, eliminating a common source of bugs and version mismatches in published packages. Your package consumers receive accurate dependency information, proper version constraints are maintained, and you avoid the frustration of debugging dependency resolution issues caused by outdated .nuspec metadata.

The integration is seamless—once configured, the tool runs as part of your standard build process, requiring no additional commands or workflow changes. It simply ensures that your package metadata accurately reflects your project's actual dependencies every time you build.

Note: This tool is designed specifically for .NET Core projects only.



You can find a video of how to use this Nuget Package here.

For more details on how to install and configure this extension click here.