diff --git a/.editorconfig b/.editorconfig index 5502d9c316c..1f863f6b71e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -386,6 +386,7 @@ dotnet_diagnostic.IDE0030WithoutSuggestion.severity = error dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (nullable) dotnet_diagnostic.IDE0051.severity = warning # Private member unused dotnet_diagnostic.IDE0052.severity = warning # Remove unread private members +dotnet_diagnostic.IDE0059.severity = error # Unnecessary assignment dotnet_diagnostic.IDE0079.severity = warning # Unused suppresion dotnet_diagnostic.IDE0083.severity = warning # Use pattern matching dotnet_diagnostic.IDE0084.severity = warning # Use IsNot diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/References/AbstractReferenceHandler.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/References/AbstractReferenceHandler.cs index b658adaf96f..10527f19d9f 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/References/AbstractReferenceHandler.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/References/AbstractReferenceHandler.cs @@ -67,7 +67,6 @@ internal async Task> GetReferencesAsync(Configu private static async Task GetAttributeTreatAsUsedAsync(IProjectProperties metadata) { - var propertyNames = await metadata.GetPropertyNamesAsync(); string? value = await metadata.GetEvaluatedPropertyValueAsync(ProjectReference.TreatAsUsedProperty); return value is not null && PropertySerializer.SimpleTypes.ToValue(value); diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/UpToDateCheckStatePersistence.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/UpToDateCheckStatePersistence.cs index e89a6a64330..cb37237feb9 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/UpToDateCheckStatePersistence.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/UpToDate/UpToDateCheckStatePersistence.cs @@ -178,7 +178,7 @@ async Task GetCacheFilePathAsync(CancellationToken cancellationToken) guidProject: Guid.Empty, fVersionSpecific: true, fEnsureCreated: true, - out bool isTemporary, + out _, // isTemporary out string workingFolderPath); return Path.Combine(workingFolderPath, ProjectItemCacheFileName); diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/ProjectSystem/PackageRestore/PackageRestoreCycleDetectorTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/ProjectSystem/PackageRestore/PackageRestoreCycleDetectorTests.cs index a9af5c85762..b24f8437758 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/ProjectSystem/PackageRestore/PackageRestoreCycleDetectorTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests/ProjectSystem/PackageRestore/PackageRestoreCycleDetectorTests.cs @@ -40,8 +40,6 @@ private static PackageRestoreCycleDetector CreateInstance() { var project = UnconfiguredProjectFactory.CreateWithActiveConfiguredProjectProvider(IProjectThreadingServiceFactory.Create()); - var projectSystemOptions = new Mock(); - var telemetryService = new Mock(); var nonModelNotificationService = new Mock(); diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Rules/MiscellaneousRuleTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Rules/MiscellaneousRuleTests.cs index 107bb9b1da8..ba72e5f8823 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Rules/MiscellaneousRuleTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Rules/MiscellaneousRuleTests.cs @@ -271,7 +271,6 @@ public static IEnumerable GetEmbeddedRules() foreach (var rule in GetAllRules()) { string ruleName = (string)rule[0]; - string fullPath = (string)rule[1]; if (s_embeddedRuleNames.Contains(ruleName)) { diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/UpToDate/BuildUpToDateCheckTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/UpToDate/BuildUpToDateCheckTests.cs index e324aaa7dfc..68b7d85679c 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/UpToDate/BuildUpToDateCheckTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/UpToDate/BuildUpToDateCheckTests.cs @@ -679,7 +679,6 @@ public async Task IsUpToDateAsync_True_NewProjectRebuiltThenBuilt() var t0 = DateTime.UtcNow.AddMinutes(-3); // t0 Input file timestamp var t1 = DateTime.UtcNow.AddMinutes(-2); // t1 Rebuild (sets output file timestamp) - var t2 = DateTime.UtcNow.AddMinutes(-1); // t2 Check up-to-date (true) _fileSystem.AddFile(_inputPath, t0);