NuGet Version Checker is a project aims recency of NuGet packges on projects.
Since there is no tracking mechanism that notifies users of package without manually checking them, NuGetVersionChecker will allow a way to track packages certain ways on upcoming versions.
Release: Latest release
.NET CLI:
dotnet add package NuGetVersionChecker
// Path for .csporj file. Return list of `Package` that contains package names, versions and availability to update.
CheckVersionAsync(string path, bool includePrelease = false);
// Path for .csproj file. Returns list of `Package` that contains package name and it version.
GetPackages(string path);
// packageName of the NuGet package. Returns `Package` that contains package name and its version.
GetPackageFromNuGetAsync(string packageName, bool includePrerelease = false);
// packageNameList of the list of NuGet package names. Returns List of `Package` that contains packages name and their versions.
GetPackagesFromNuGetAsync(List<string> packageNameList, bool includePrerelease = false);
// Call this method.
NuGetVersionCheck();
internal static void NuGetVersionCheck()
{
string currentDirectory = System.IO.Directory.GetCurrentDirectory();
string startupPath = Directory.GetParent(currentDirectory).Parent.Parent.FullName;
string appName = Assembly.GetExecutingAssembly().GetName().Name;
List<Package> result = CheckVersionAsync($"{startupPath}//{appName}.csproj").GetAwaiter().GetResult();
foreach (Package package in result.Where(p => p.UpdateAvailable))
{
Console.WriteLine($"Update available for: {package}");
// Debug.WriteLine($"Update available for: {package}");
}
}
To check listed methods visit wiki page. NuGetVersionChecker Wiki
See Changelog
This repository is licensed under the “MIT” license. See MIT license.
If you’d like to contribute, then contribute. contributing guide.
Twitter: Enes Okullu @enesokullu