add package version consistency check

This commit is contained in:
Matthew Parker [SSW]
2024-05-21 18:16:56 +10:00
parent 46a8fd6cb2
commit 0c036ab772
3 changed files with 107 additions and 1 deletions

View File

@@ -158,6 +158,27 @@ public partial class MainWindowViewModel : ObservableObject
}
}
[RelayCommand]
private async Task CheckForInconsistentNugetPackageVersionsInSolutionFile(CancellationToken token)
{
SetBeginCommandState();
try
{
await Task.Run(
() =>
{
var results = PackageVersionConsistency.FindInconsistentNugetPackageVersions(SolutionFilePath);
SetCommandSuccessState($"{results.Count} packages with inconsistent versions", results);
},
token
);
}
catch (Exception e)
{
SetCommandFailureState("Failed to check for inconsistent package versions in solution file", e);
}
}
[RelayCommand]
private async Task CheckForMissingImplicitUsingsInSolutionFile(CancellationToken token)
{