From f7937066bb6f0e220f074fef6005ec4163006dc7 Mon Sep 17 00:00:00 2001 From: David Garton Date: Mon, 13 Jul 2026 19:55:09 -0400 Subject: [PATCH] Fix build warnings treated as errors across the solution Added missing XML documentation, removed a stray semicolon, fixed a nullability warning in tests, and resolved the remaining warning issues so the solution builds cleanly with TreatWarningsAsErrors enabled. Where obsolete usage is intentional, the warning is suppressed in the narrowest applicable scope. --- .../UvicornAppHostingExtension.cs | 2 ++ .../SqlPackageResource.cs | 2 +- .../KurrentDBPublicApiTests.cs | 2 +- tests/CommunityToolkit.Aspire.Testing/ConformanceTests.cs | 1 - tests/CommunityToolkit.Aspire.Testing/TypeScriptAppHostTest.cs | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/CommunityToolkit.Aspire.Hosting.Python.Extensions/UvicornAppHostingExtension.cs b/src/CommunityToolkit.Aspire.Hosting.Python.Extensions/UvicornAppHostingExtension.cs index b50187d27..9315751ce 100644 --- a/src/CommunityToolkit.Aspire.Hosting.Python.Extensions/UvicornAppHostingExtension.cs +++ b/src/CommunityToolkit.Aspire.Hosting.Python.Extensions/UvicornAppHostingExtension.cs @@ -1,7 +1,9 @@ using System.ComponentModel; using Aspire.Hosting.ApplicationModel; using CommunityToolkit.Aspire.Utils; +#pragma warning disable CS0618 // Type or member is obsolete using UvicornAppResource = Aspire.Hosting.ApplicationModel.UvicornAppResource; +#pragma warning restore CS0618 // Type or member is obsolete namespace Aspire.Hosting; diff --git a/src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlPackageResource.cs b/src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlPackageResource.cs index d7869cffa..8355bd2e5 100644 --- a/src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlPackageResource.cs +++ b/src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlPackageResource.cs @@ -17,7 +17,7 @@ string IResourceWithDacpac.GetDacpacPath() var packagePath = packageMetadata.PackagePath; if (this.TryGetLastAnnotation(out var relativeDacpacMetadata)) { - return Path.Combine(packagePath, relativeDacpacMetadata.DacpacPath);; + return Path.Combine(packagePath, relativeDacpacMetadata.DacpacPath); } else { diff --git a/tests/CommunityToolkit.Aspire.Hosting.KurrentDB.Tests/KurrentDBPublicApiTests.cs b/tests/CommunityToolkit.Aspire.Hosting.KurrentDB.Tests/KurrentDBPublicApiTests.cs index f37716a7c..8200c726b 100644 --- a/tests/CommunityToolkit.Aspire.Hosting.KurrentDB.Tests/KurrentDBPublicApiTests.cs +++ b/tests/CommunityToolkit.Aspire.Hosting.KurrentDB.Tests/KurrentDBPublicApiTests.cs @@ -132,7 +132,7 @@ public void KurrentDBResourceCtorShouldThrowWhenNameIsNull() var builder = new DistributedApplicationBuilder([]); const string name = null!; - var action = () => new KurrentDBResource(name); + var action = () => new KurrentDBResource(name!); var exception = Assert.Throws(action); Assert.Equal(nameof(name), exception.ParamName); diff --git a/tests/CommunityToolkit.Aspire.Testing/ConformanceTests.cs b/tests/CommunityToolkit.Aspire.Testing/ConformanceTests.cs index bd4446459..ecea5b84d 100644 --- a/tests/CommunityToolkit.Aspire.Testing/ConformanceTests.cs +++ b/tests/CommunityToolkit.Aspire.Testing/ConformanceTests.cs @@ -66,7 +66,6 @@ protected virtual void DisableRetries(TOptions options) { } /// /// Populates the Configuration with everything that is required by the Component /// - /// protected abstract void PopulateConfiguration(ConfigurationManager configuration, string? key = null); /// diff --git a/tests/CommunityToolkit.Aspire.Testing/TypeScriptAppHostTest.cs b/tests/CommunityToolkit.Aspire.Testing/TypeScriptAppHostTest.cs index 2759fb335..8fd8b9ebd 100644 --- a/tests/CommunityToolkit.Aspire.Testing/TypeScriptAppHostTest.cs +++ b/tests/CommunityToolkit.Aspire.Testing/TypeScriptAppHostTest.cs @@ -15,6 +15,7 @@ public static class TypeScriptAppHostTest /// The Aspire resource status to wait for. /// Optional commands that must exist on PATH before validation runs. /// Optional dictionary of secret key-value pairs to set via aspire secret set before starting the app host. + /// Optional timeout, in seconds, to wait for resources to reach the expected status. /// The cancellation token. public static async Task Run( string appHostProject,