From 0433eaae6774b57dad8589d02b8433c8f19603af Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Thu, 5 Mar 2026 18:36:13 -0600 Subject: [PATCH 1/2] Update Azure.Provisioning.Network to stable 1.0.0 and ship Aspire.Hosting.Azure.Network as stable - Update Azure.Provisioning.Network from 1.0.0-beta.3 to 1.0.0 (stable) - Remove SuppressFinalPackageVersion from Aspire.Hosting.Azure.Network csproj so the package ships as a stable release - Add DisablePackageBaselineValidation since this is the first stable release and there is no prior baseline to validate against - Add assembly-level [Experimental(ASPIREAZURE003)] attribute to Aspire.Hosting.Azure.Network so consumers get an experimental warning - Add #pragma warning disable ASPIREAZURE003 to files in Aspire.Hosting.Azure.Sql, tests, and playground that consume the now-experimental assembly - This is needed because Aspire.Hosting.Azure.Sql depends on Aspire.Hosting.Azure.Network and cannot ship stable with a prerelease dependency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 2 +- .../AzureVirtualNetworkEndToEnd.AppHost/Program.cs | 1 + .../Aspire.Hosting.Azure.Network.csproj | 2 +- src/Aspire.Hosting.Azure.Network/AssemblyInfo.cs | 6 ++++++ .../AdminDeploymentScriptSubnetAnnotation.cs | 2 ++ src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs | 2 ++ tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs | 1 + .../AzureNatGatewayExtensionsTests.cs | 2 ++ .../AzurePrivateEndpointLockdownTests.cs | 2 ++ .../AzureResourcePreparerTests.cs | 2 ++ .../AzureStoragePrivateEndpointLockdownTests.cs | 2 ++ 11 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/Aspire.Hosting.Azure.Network/AssemblyInfo.cs diff --git a/Directory.Packages.props b/Directory.Packages.props index 66058d49354..8c2ea50095c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -48,7 +48,7 @@ - + diff --git a/playground/AzureVirtualNetworkEndToEnd/AzureVirtualNetworkEndToEnd.AppHost/Program.cs b/playground/AzureVirtualNetworkEndToEnd/AzureVirtualNetworkEndToEnd.AppHost/Program.cs index 9994579d456..70f955c925c 100644 --- a/playground/AzureVirtualNetworkEndToEnd/AzureVirtualNetworkEndToEnd.AppHost/Program.cs +++ b/playground/AzureVirtualNetworkEndToEnd/AzureVirtualNetworkEndToEnd.AppHost/Program.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. #pragma warning disable AZPROVISION001 // Azure.Provisioning.Network is experimental +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. using Aspire.Hosting.Azure; using Azure.Provisioning.Network; diff --git a/src/Aspire.Hosting.Azure.Network/Aspire.Hosting.Azure.Network.csproj b/src/Aspire.Hosting.Azure.Network/Aspire.Hosting.Azure.Network.csproj index 485c5baba74..dc9b9da99dc 100644 --- a/src/Aspire.Hosting.Azure.Network/Aspire.Hosting.Azure.Network.csproj +++ b/src/Aspire.Hosting.Azure.Network/Aspire.Hosting.Azure.Network.csproj @@ -6,7 +6,7 @@ aspire integration hosting azure network vnet virtual-network subnet nat-gateway public-ip cloud Azure Virtual Network resource types for Aspire. $(SharedDir)Azure_256x.png - true + true $(NoWarn);AZPROVISION001;ASPIREAZURE003 diff --git a/src/Aspire.Hosting.Azure.Network/AssemblyInfo.cs b/src/Aspire.Hosting.Azure.Network/AssemblyInfo.cs new file mode 100644 index 00000000000..84d0d6a2e7f --- /dev/null +++ b/src/Aspire.Hosting.Azure.Network/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; + +[assembly: Experimental("ASPIREAZURE003", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")] diff --git a/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs b/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs index 7a603b0ae5a..7a5ce7dc3fa 100644 --- a/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs +++ b/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. + using Aspire.Hosting.ApplicationModel; using Aspire.Hosting.Azure; diff --git a/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs b/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs index cc9875fd006..8db0a840b8b 100644 --- a/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs +++ b/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. + using System.Net; using System.Net.Sockets; using Aspire.Hosting.Azure; diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs index abc9e7e8736..3de799e807f 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureDeployerTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. #pragma warning disable ASPIREAZURE001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. #pragma warning disable ASPIREPIPELINES002 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. #pragma warning disable ASPIREINTERACTION001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. #pragma warning disable ASPIREPIPELINES001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureNatGatewayExtensionsTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureNatGatewayExtensionsTests.cs index 723c0acd18a..c1e1040b487 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureNatGatewayExtensionsTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureNatGatewayExtensionsTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. + using Aspire.Hosting.Utils; namespace Aspire.Hosting.Azure.Tests; diff --git a/tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointLockdownTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointLockdownTests.cs index 2dc611cc090..a478ea46ea8 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointLockdownTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointLockdownTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. + using Aspire.Hosting.Utils; namespace Aspire.Hosting.Azure.Tests; diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs index e313350b98f..b549f7b144f 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. + using Aspire.Hosting.ApplicationModel; using Aspire.Hosting.Utils; using Azure.Provisioning.Storage; diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureStoragePrivateEndpointLockdownTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureStoragePrivateEndpointLockdownTests.cs index 65bc24e123c..8aa2b45de0e 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureStoragePrivateEndpointLockdownTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureStoragePrivateEndpointLockdownTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. + using Aspire.Hosting.Utils; using Azure.Provisioning.Storage; From eddce4fd50e0aae937bf342dcb50087cf5a5ecca Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Fri, 6 Mar 2026 16:48:04 -0600 Subject: [PATCH 2/2] Fix up experimental annotation --- .../AdminDeploymentScriptSubnetAnnotation.cs | 4 ++-- src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs b/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs index 7a5ce7dc3fa..3e5980e9f8a 100644 --- a/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs +++ b/src/Aspire.Hosting.Azure.Sql/AdminDeploymentScriptSubnetAnnotation.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. - +using System.Diagnostics.CodeAnalysis; using Aspire.Hosting.ApplicationModel; using Aspire.Hosting.Azure; @@ -11,6 +10,7 @@ namespace Aspire.Hosting; /// /// Annotation that stores the ACI subnet reference for deployment script configuration. /// +[Experimental("ASPIREAZURE003")] internal sealed class AdminDeploymentScriptSubnetAnnotation(AzureSubnetResource subnet) : IResourceAnnotation { /// diff --git a/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs b/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs index 8db0a840b8b..1a3a10e8b7e 100644 --- a/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs +++ b/src/Aspire.Hosting.Azure.Sql/SubnetAddressAllocator.cs @@ -1,8 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma warning disable ASPIREAZURE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. - +using System.Diagnostics.CodeAnalysis; using System.Net; using System.Net.Sockets; using Aspire.Hosting.Azure; @@ -12,6 +11,7 @@ namespace Aspire.Hosting; /// /// Allocates subnet address space within a virtual network. /// +[Experimental("ASPIREAZURE003")] internal static class SubnetAddressAllocator { ///