From 6e034080fbab44e9f8dccdc0482e596ee952b31c Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Mon, 21 Oct 2024 15:45:20 +1100 Subject: [PATCH 1/3] Add diag code for ConfigureCustomDomains. --- docs/diagnostics/overview.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/diagnostics/overview.md b/docs/diagnostics/overview.md index 7ac974db2..7019fa2d9 100644 --- a/docs/diagnostics/overview.md +++ b/docs/diagnostics/overview.md @@ -28,3 +28,24 @@ Alternatively, you can suppress this diagnostic with preprocessor directive by a // API that is causing the warning. #pragma warning restore AZPROVISION001 ``` + +## ASPIREACADOMAINS001 + +.NET Aspire 9.0 introduces the ability to customize container app resources using the `PublishAsAzureContainerApp(...)` extension method. When using this method the Azure Developer CLI (`azd`) can no longer preserve custom domains. Instead use the `ConfigureCustomDomain` method to configure a custom domain within the .NET Aspire app host. The `ConfigureCustomDomain(...)` extension method is experimental. To suppress the compiler error/warning use the following code: + +To suppress this diagnostic with the `SuppressMessageAttribute`, add the following code to your project: + +```csharp +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("ASPIREACADOMAINS001", "Justification")] +``` + +Alternatively, you can suppress this diagnostic with preprocessor directive by adding the following code to your project: + +```csharp +#pragma warning disable ASPIREACADOMAINS001 + // API that is causing the warning. +#pragma warning restore ASPIREACADOMAINS001 +``` + From e9f8af12e5f9a21ac4355d27f61ee5805b66b75f Mon Sep 17 00:00:00 2001 From: Mitch Denny Date: Mon, 21 Oct 2024 15:47:22 +1100 Subject: [PATCH 2/3] Blank lines lint error. --- docs/diagnostics/overview.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/diagnostics/overview.md b/docs/diagnostics/overview.md index 7019fa2d9..14ad9d94e 100644 --- a/docs/diagnostics/overview.md +++ b/docs/diagnostics/overview.md @@ -47,5 +47,4 @@ Alternatively, you can suppress this diagnostic with preprocessor directive by a #pragma warning disable ASPIREACADOMAINS001 // API that is causing the warning. #pragma warning restore ASPIREACADOMAINS001 -``` - +``` \ No newline at end of file From af9b3381cf7559cbfcc06638c90e784e0303b0d0 Mon Sep 17 00:00:00 2001 From: David Pine Date: Mon, 21 Oct 2024 08:08:33 -0500 Subject: [PATCH 3/3] Update overview.md --- docs/diagnostics/overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/diagnostics/overview.md b/docs/diagnostics/overview.md index 14ad9d94e..0ac0d9452 100644 --- a/docs/diagnostics/overview.md +++ b/docs/diagnostics/overview.md @@ -2,7 +2,7 @@ title: .NET Aspire diagnostics overview description: Learn about the diagnostics tools and features available in .NET Aspire. ms.topic: overview -ms.date: 03/25/2024 +ms.date: 10/21/2024 --- # .NET Aspire diagnostics overview @@ -47,4 +47,4 @@ Alternatively, you can suppress this diagnostic with preprocessor directive by a #pragma warning disable ASPIREACADOMAINS001 // API that is causing the warning. #pragma warning restore ASPIREACADOMAINS001 -``` \ No newline at end of file +```