diff --git a/src/GUI/Directory.Build.Props b/src/GUI/Directory.Build.Props index 51ebcc1e9..52eb5be15 100644 --- a/src/GUI/Directory.Build.Props +++ b/src/GUI/Directory.Build.Props @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs b/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs index e30245633..7f79261af 100644 --- a/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs +++ b/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs @@ -358,7 +358,6 @@ private async void OnProjectMenuBeforeQueryStatus(object sender, EventArgs e) { menuCommand.Visible = await project.IsNet60OrHigherAsync() && await project.IsInstalledAsync(new NuGetPackage { PackageId = "Microsoft.EntityFrameworkCore" }); - return; } } diff --git a/src/GUI/Shared/Helpers/RoslynExtensions.cs b/src/GUI/Shared/Helpers/RoslynExtensions.cs index 15f202dee..9ff420d21 100644 --- a/src/GUI/Shared/Helpers/RoslynExtensions.cs +++ b/src/GUI/Shared/Helpers/RoslynExtensions.cs @@ -51,7 +51,7 @@ public static async Task RenamePropertyAsync( // found it var model = await document.GetSemanticModelAsync(); var propSymbol = model.GetDeclaredSymbol(propSyntax) ?? - throw new Exception("Property symbol not found"); + throw new InvalidOperationException("Property symbol not found"); // rename all references to the property var newSolution = await Renamer.RenameSymbolAsync( @@ -73,7 +73,7 @@ public static async Task SaveDocumentsAsync(this IEnumerable docu var saveCount = 0; foreach (var document in documents) { - var path = document.FilePath ?? throw new Exception("Path unknown for document " + document.Name); + var path = document.FilePath ?? throw new InvalidOperationException("Path unknown for document " + document.Name); var text = string.Join( Environment.NewLine, (await document.GetTextAsync()).Lines.Select(o => o.ToString())).Trim(); diff --git a/src/GUI/UnitTests/ViewModels/ObjectTreeViewModelTests.cs b/src/GUI/UnitTests/ViewModels/ObjectTreeViewModelTests.cs index 356b65c1e..9511417e3 100644 --- a/src/GUI/UnitTests/ViewModels/ObjectTreeViewModelTests.cs +++ b/src/GUI/UnitTests/ViewModels/ObjectTreeViewModelTests.cs @@ -575,7 +575,7 @@ private static void AreObjectsEqual(TableModel a, ITableInformationViewModel b) Assert.AreEqual(a.ObjectType, b.ObjectType); for (var i = 0; i < a.Columns.Count(); i++) { - Assert.AreEqual(a.Columns.ElementAt(i).Name, b.Columns.ElementAt(i).Name); + Assert.AreEqual(a.Columns.ElementAt(i).Name, b.Columns[i].Name); } } }