dotnet upgrade
This commit is contained in:
@@ -153,6 +153,24 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
ParityResults?.Add(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task UpdateAllProjectsToNet80(CancellationToken token)
|
||||
{
|
||||
ErrorMessages?.Clear();
|
||||
ParityResults.Clear();
|
||||
ResultsLabel = string.Empty;
|
||||
try
|
||||
{
|
||||
DotNetUpgrade.UpdateProjectsInSolutionToNet80(SolutionFilePath);
|
||||
ResultsLabel = "Successfully updated all projects in solution to .NET 8";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ResultsLabel = "Failed to update all projects in solution to .NET 8";
|
||||
ParityResults?.Add(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task LoadSolutionFile(CancellationToken token)
|
||||
|
||||
@@ -95,6 +95,15 @@
|
||||
Clear bin and obj folders
|
||||
</TextBlock>
|
||||
</Button>
|
||||
<Button Grid.Row="2" Grid.Column="1" MinHeight="130" Padding="10" Margin="5"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
|
||||
IsEnabled="{Binding SolutionFilePath, Mode=OneWay, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
Command="{Binding UpdateAllProjectsToNet80Command}">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
Update all projects in Solution to .NET 8.0
|
||||
</TextBlock>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Label HorizontalAlignment="Center" Name="ResultsLabel" Content="{Binding ResultsLabel}"></Label>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user