Check Nuget Dependencies Task
When creating nuget packages, keeping the version requirements in the nuspec file can be tedious. Every time a dependency is updated, the version requirements have to be checked.
The Appccelerate.CheckNugetDependenciesTask checks whether all needed dependencies are present in the nuspec file and whether versions match with references in the project file. If the check fails, the build fails.
The CheckNugetDependenciesTask makes only sense when packages are created from nuspec files. When creating packages from project files, nuget will add all needed dependencies automatically.
- checks dependencies and their versions in nuspec file against references in project file
- integrated in build process
- supports regular expressions for defining exclusions
You can install the CheckNugetDependenciesTask using nuget. The package id is
The CheckNugetDependenciesTask checks both nuget and framework dependencies.
The CheckNugetDependenciesTask checks whether there is a corresponding dependency for every nuget dependency found in the packages.config file. Development dependencies are excluded, though. They are normally not part of the create package, but only used inside the project (e.g. Stylecop).
The task can currently only parse nuget version restrictions in the form of
When you reference a nuget package that has dependencies to further dependencies. These dependencies must be added, too. Otherwise the task will fail.
The CheckNugetDependenciesTask checks whether there is a corresponding framework dependency for every reference in the project file that has no hint path.