Add Nuget package version resolver

This commit is contained in:
Matthew Parker [SSW]
2024-05-22 13:43:15 +10:00
parent 38c3f6c8ed
commit 03c55a8190
3 changed files with 78 additions and 23 deletions

View File

@@ -157,6 +157,27 @@ public partial class MainWindowViewModel : ObservableObject
}
}
[RelayCommand]
private async Task ResolveInconsistentNugetPackageVersionsInSolutionFile(CancellationToken token)
{
SetBeginCommandState();
try
{
await Task.Run(
() =>
{
PackageVersionConsistency.ResolvePackageVersionsToLatestInstalled(SolutionFilePath);
SetCommandSuccessState("Resolved all packages with inconsistent versions");
},
token
);
}
catch (Exception e)
{
SetCommandFailureState("Failed to resolve inconsistent package versions in solution file", e);
}
}
[RelayCommand]
private async Task CheckForInconsistentNugetPackageVersionsInSolutionFile(CancellationToken token)
{