diff --git a/src/Aspire.Hosting.Azure.Network/CompatibilitySuppressions.xml b/src/Aspire.Hosting.Azure.Network/CompatibilitySuppressions.xml
index 22fec018e7d..0497d618a92 100644
--- a/src/Aspire.Hosting.Azure.Network/CompatibilitySuppressions.xml
+++ b/src/Aspire.Hosting.Azure.Network/CompatibilitySuppressions.xml
@@ -1,39 +1,3 @@
-
-
- CP0002
- M:Aspire.Hosting.Azure.AzureNatGatewayResource.get_NameOutput
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- true
-
-
- CP0002
- M:Aspire.Hosting.Azure.AzureNetworkSecurityGroupResource.get_NameOutput
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- true
-
-
- CP0002
- M:Aspire.Hosting.Azure.AzurePrivateEndpointResource.get_NameOutput
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- true
-
-
- CP0002
- M:Aspire.Hosting.Azure.AzurePublicIPAddressResource.get_NameOutput
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- true
-
-
- CP0002
- M:Aspire.Hosting.Azure.AzureVirtualNetworkResource.get_NameOutput
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- lib/net8.0/Aspire.Hosting.Azure.Network.dll
- true
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Aspire.Hosting.Azure/AzureRoleAssignmentResource.cs b/src/Aspire.Hosting.Azure/AzureRoleAssignmentResource.cs
index db0da95114b..fa14bc2273e 100644
--- a/src/Aspire.Hosting.Azure/AzureRoleAssignmentResource.cs
+++ b/src/Aspire.Hosting.Azure/AzureRoleAssignmentResource.cs
@@ -1,6 +1,7 @@
// 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;
using Aspire.Hosting.ApplicationModel;
namespace Aspire.Hosting.Azure;
@@ -19,6 +20,7 @@ namespace Aspire.Hosting.Azure;
/// The Aspire resource that owns this set of role assignments, or for global role assignments granted to the deployment principal.
/// The user-assigned managed identity whose principal receives the role assignments, or for global role assignments granted to the deployment principal.
/// Callback to configure the Azure role assignment resources.
+[Experimental("ASPIREAZURE003", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public sealed class AzureRoleAssignmentResource(
string name,
AzureProvisioningResource targetAzureResource,
diff --git a/src/Aspire.Hosting.Azure/CompatibilitySuppressions.xml b/src/Aspire.Hosting.Azure/CompatibilitySuppressions.xml
index 78cdfa201ac..0497d618a92 100644
--- a/src/Aspire.Hosting.Azure/CompatibilitySuppressions.xml
+++ b/src/Aspire.Hosting.Azure/CompatibilitySuppressions.xml
@@ -1,18 +1,3 @@
-
-
- CP0002
- M:Aspire.Hosting.Azure.IAzurePrivateEndpointTarget.GetPrivateDnsZoneName
- lib/net8.0/Aspire.Hosting.Azure.dll
- lib/net8.0/Aspire.Hosting.Azure.dll
- true
-
-
- CP0006
- M:Aspire.Hosting.Azure.IAzurePrivateEndpointTarget.GetPrivateDnsZoneNames
- lib/net8.0/Aspire.Hosting.Azure.dll
- lib/net8.0/Aspire.Hosting.Azure.dll
- true
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Aspire.Hosting.Azure/RoleAssignmentResourceAnnotation.cs b/src/Aspire.Hosting.Azure/RoleAssignmentResourceAnnotation.cs
index 932becea274..a1f521c235a 100644
--- a/src/Aspire.Hosting.Azure/RoleAssignmentResourceAnnotation.cs
+++ b/src/Aspire.Hosting.Azure/RoleAssignmentResourceAnnotation.cs
@@ -8,6 +8,7 @@ namespace Aspire.Hosting.Azure;
///
/// An annotation that points to the resource that contains the role assignments for an Azure resource.
///
+#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.
internal sealed class RoleAssignmentResourceAnnotation(AzureRoleAssignmentResource rolesResource) : IResourceAnnotation
{
///
@@ -15,3 +16,4 @@ internal sealed class RoleAssignmentResourceAnnotation(AzureRoleAssignmentResour
///
public AzureRoleAssignmentResource RolesResource { get; } = rolesResource;
}
+#pragma warning restore ASPIREAZURE003
diff --git a/src/Aspire.Hosting.Blazor/Resources/BlazorWasmAppResource.cs b/src/Aspire.Hosting.Blazor/Resources/BlazorWasmAppResource.cs
index a4210b92ba8..3a152f7927c 100644
--- a/src/Aspire.Hosting.Blazor/Resources/BlazorWasmAppResource.cs
+++ b/src/Aspire.Hosting.Blazor/Resources/BlazorWasmAppResource.cs
@@ -17,7 +17,7 @@ namespace Aspire.Hosting;
///
[Experimental("ASPIREBLAZOR001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
[AspireExport]
-public class BlazorWasmAppResource(string name, string projectPath) : Resource(name), IResourceWithEnvironment, IResourceWithParent
+public sealed class BlazorWasmAppResource(string name, string projectPath) : Resource(name), IResourceWithEnvironment, IResourceWithParent
{
/// Fully-qualified path to the .csproj file.
public string ProjectPath { get; } = projectPath;
diff --git a/src/Aspire.Hosting.Docker/CompatibilitySuppressions.xml b/src/Aspire.Hosting.Docker/CompatibilitySuppressions.xml
index bfdd2c52258..0497d618a92 100644
--- a/src/Aspire.Hosting.Docker/CompatibilitySuppressions.xml
+++ b/src/Aspire.Hosting.Docker/CompatibilitySuppressions.xml
@@ -1,25 +1,3 @@
-
-
- CP0002
- M:Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm.UpdateConfig.get_FailOnError
- lib/net8.0/Aspire.Hosting.Docker.dll
- lib/net8.0/Aspire.Hosting.Docker.dll
- true
-
-
- CP0002
- M:Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm.UpdateConfig.get_Parallelism
- lib/net8.0/Aspire.Hosting.Docker.dll
- lib/net8.0/Aspire.Hosting.Docker.dll
- true
-
-
- CP0002
- M:Aspire.Hosting.Docker.Resources.ServiceNodes.Swarm.UpdateConfig.set_FailOnError(System.Nullable{System.Boolean})
- lib/net8.0/Aspire.Hosting.Docker.dll
- lib/net8.0/Aspire.Hosting.Docker.dll
- true
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Aspire.Hosting.JavaScript/BunAppResource.cs b/src/Aspire.Hosting.JavaScript/BunAppResource.cs
index 1c553fea982..866a751efb8 100644
--- a/src/Aspire.Hosting.JavaScript/BunAppResource.cs
+++ b/src/Aspire.Hosting.JavaScript/BunAppResource.cs
@@ -12,5 +12,5 @@ namespace Aspire.Hosting.JavaScript;
/// The command to execute.
/// The working directory to use for the command.
[AspireExport(ExposeProperties = true)]
-public class BunAppResource(string name, string command, string workingDirectory)
+public sealed class BunAppResource(string name, string command, string workingDirectory)
: JavaScriptAppResource(name, command, workingDirectory), IResourceWithServiceDiscovery, IContainerFilesDestinationResource;
diff --git a/src/Aspire.Hosting.JavaScript/CompatibilitySuppressions.xml b/src/Aspire.Hosting.JavaScript/CompatibilitySuppressions.xml
new file mode 100644
index 00000000000..bfacb9bb9b6
--- /dev/null
+++ b/src/Aspire.Hosting.JavaScript/CompatibilitySuppressions.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ CP0002
+ M:Aspire.Hosting.JavaScriptHostingExtensions.PublishAsNpmScript``1(Aspire.Hosting.ApplicationModel.IResourceBuilder{``0},System.String,System.String)
+ lib/net8.0/Aspire.Hosting.JavaScript.dll
+ lib/net8.0/Aspire.Hosting.JavaScript.dll
+ true
+
+
\ No newline at end of file
diff --git a/src/Aspire.Hosting.Kubernetes/KubernetesHelmChartResource.cs b/src/Aspire.Hosting.Kubernetes/KubernetesHelmChartResource.cs
index 3580a361116..2c31a784a40 100644
--- a/src/Aspire.Hosting.Kubernetes/KubernetesHelmChartResource.cs
+++ b/src/Aspire.Hosting.Kubernetes/KubernetesHelmChartResource.cs
@@ -41,7 +41,7 @@ namespace Aspire.Hosting.Kubernetes;
///
///
[AspireExport]
-public class KubernetesHelmChartResource : Resource, IResourceWithParent
+public sealed class KubernetesHelmChartResource : Resource, IResourceWithParent
{
///
/// Initializes a new instance of .
diff --git a/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs b/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs
index 8761dd98dab..40e6c181cac 100644
--- a/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs
+++ b/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs
@@ -45,13 +45,13 @@ public class AllocatedEndpoint
/// The port number of the endpoint.
/// A string representing how to retrieve the target port of the instance.
/// The binding mode of the endpoint.
- /// The network identifier for the network associated with the endpoint.
+ /// The network identifier for the network associated with the endpoint.
public AllocatedEndpoint(
EndpointAnnotation endpoint,
string address, int port,
EndpointBindingMode bindingMode,
string? targetPortExpression = null,
- NetworkIdentifier? networkID = null
+ NetworkIdentifier? networkId = null
)
{
ArgumentNullException.ThrowIfNull(endpoint);
@@ -63,7 +63,7 @@ public AllocatedEndpoint(
BindingMode = bindingMode;
Port = port;
TargetPortExpression = targetPortExpression;
- NetworkID = networkID ?? endpoint.DefaultNetworkID;
+ NetworkID = networkId ?? endpoint.DefaultNetworkID;
}
///
diff --git a/src/Aspire.Hosting/ApplicationModel/EndpointAnnotation.cs b/src/Aspire.Hosting/ApplicationModel/EndpointAnnotation.cs
index 3d1cbc9db7c..354499973c1 100644
--- a/src/Aspire.Hosting/ApplicationModel/EndpointAnnotation.cs
+++ b/src/Aspire.Hosting/ApplicationModel/EndpointAnnotation.cs
@@ -25,7 +25,7 @@ public sealed class EndpointAnnotation : IResourceAnnotation
private bool? _tlsEnabled;
private bool _isProxied = true;
private bool? _isExplicitlyProxied;
- private readonly NetworkIdentifier _networkID;
+ private readonly NetworkIdentifier _networkId;
///
/// Initializes a new instance of .
@@ -97,7 +97,7 @@ bool isProxied
/// Initializes a new instance of .
///
/// Network protocol: TCP or UDP are supported today, others possibly in future.
- /// The ID of the network that is the "default" network for the Endpoint.
+ /// The ID of the network that is the "default" network for the Endpoint.
/// Clients connected to the same network can reach the endpoint without any routing or network address translation.
/// If a service is URI-addressable, this is the URI scheme to use for constructing service URI.
/// Transport that is being used (e.g. http, http2, http3 etc).
@@ -108,7 +108,7 @@ bool isProxied
/// Specifies if the endpoint will be proxied by DCP. Defaults to .
public EndpointAnnotation(
ProtocolType protocol,
- NetworkIdentifier? networkID,
+ NetworkIdentifier? networkId,
string? uriScheme = null,
string? transport = null,
[EndpointName] string? name = null,
@@ -136,9 +136,9 @@ public EndpointAnnotation(
_targetPort = targetPort;
IsExternal = isExternal ?? false;
IsExplicitlyProxied = isProxied;
- _networkID = networkID ?? KnownNetworkIdentifiers.LocalhostNetwork;
+ _networkId = networkId ?? KnownNetworkIdentifiers.LocalhostNetwork;
#pragma warning disable CS0618 // Type or member is obsolete
- AllAllocatedEndpoints.TryAdd(_networkID, AllocatedEndpointSnapshot);
+ AllAllocatedEndpoints.TryAdd(_networkId, AllocatedEndpointSnapshot);
#pragma warning restore CS0618 // Type or member is obsolete
}
@@ -146,7 +146,7 @@ public EndpointAnnotation(
/// Initializes a new instance of .
///
/// Network protocol: TCP or UDP are supported today, others possibly in future.
- /// The ID of the network that is the "default" network for the Endpoint.
+ /// The ID of the network that is the "default" network for the Endpoint.
/// Clients connected to the same network can reach the endpoint without any routing or network address translation.
/// If a service is URI-addressable, this is the URI scheme to use for constructing service URI.
/// Transport that is being used (e.g. http, http2, http3 etc).
@@ -157,7 +157,7 @@ public EndpointAnnotation(
/// Specifies if the endpoint will be proxied by DCP.
public EndpointAnnotation(
ProtocolType protocol,
- NetworkIdentifier? networkID,
+ NetworkIdentifier? networkId,
string? uriScheme,
string? transport,
[EndpointName] string? name,
@@ -167,7 +167,7 @@ public EndpointAnnotation(
bool isProxied
) : this(
protocol,
- networkID,
+ networkId,
uriScheme,
transport,
name,
@@ -334,7 +334,7 @@ public bool TlsEnabled
///
/// Gets the ID of the network that is the "default" network for the Endpoint (the one the Endpoint is associated with and can be reached without routing or network address translation).
///
- public NetworkIdentifier DefaultNetworkID => _networkID;
+ public NetworkIdentifier DefaultNetworkID => _networkId;
///
/// Gets or sets the default for this Endpoint.
@@ -364,9 +364,9 @@ public AllocatedEndpoint? AllocatedEndpoint
}
else
{
- if (_networkID != value.NetworkID)
+ if (_networkId != value.NetworkID)
{
- throw new InvalidOperationException($"The default AllocatedEndpoint's network ID must match the EndpointAnnotation network ID ('{_networkID}'). The attempted AllocatedEndpoint belongs to '{value.NetworkID}'.");
+ throw new InvalidOperationException($"The default AllocatedEndpoint's network ID must match the EndpointAnnotation network ID ('{_networkId}'). The attempted AllocatedEndpoint belongs to '{value.NetworkID}'.");
}
AllocatedEndpointSnapshot.SetValue(value);
}
@@ -419,15 +419,15 @@ IEnumerator IEnumerable.GetEnumerator()
/// Adds an AllocatedEndpoint snapshot for a specific network if one does not already exist.
///
[Obsolete("This method is for internal use only and will be marked internal in a future Aspire release. Use AddOrUpdateAllocatedEndpoint instead.")]
- public bool TryAdd(NetworkIdentifier networkID, ValueSnapshot snapshot)
+ public bool TryAdd(NetworkIdentifier networkId, ValueSnapshot snapshot)
{
lock (_snapshots)
{
- if (_snapshots.Any(s => s.NetworkID.Equals(networkID)))
+ if (_snapshots.Any(s => s.NetworkID.Equals(networkId)))
{
return false;
}
- _snapshots.Add(new NetworkEndpointSnapshot(snapshot, networkID));
+ _snapshots.Add(new NetworkEndpointSnapshot(snapshot, networkId));
return true;
}
}
@@ -435,33 +435,33 @@ public bool TryAdd(NetworkIdentifier networkID, ValueSnapshot
///
/// Adds or updates an AllocatedEndpoint value associated with a specific network in the snapshot list.
///
- public void AddOrUpdateAllocatedEndpoint(NetworkIdentifier networkID, AllocatedEndpoint endpoint)
+ public void AddOrUpdateAllocatedEndpoint(NetworkIdentifier networkId, AllocatedEndpoint endpoint)
{
- if (endpoint.NetworkID != networkID)
+ if (endpoint.NetworkID != networkId)
{
- throw new ArgumentException($"AllocatedEndpoint must use the same network as the {nameof(networkID)} parameter", nameof(endpoint));
+ throw new ArgumentException($"AllocatedEndpoint must use the same network as the {nameof(networkId)} parameter", nameof(endpoint));
}
- var nes = GetSnapshotFor(networkID);
+ var nes = GetSnapshotFor(networkId);
nes.Snapshot.SetValue(endpoint);
}
///
/// Gets an AllocatedEndpoint for a given network ID, waiting for it to appear if it is not already present.
///
- public Task GetAllocatedEndpointAsync(NetworkIdentifier networkID, CancellationToken cancellationToken = default)
+ public Task GetAllocatedEndpointAsync(NetworkIdentifier networkId, CancellationToken cancellationToken = default)
{
- var nes = GetSnapshotFor(networkID);
+ var nes = GetSnapshotFor(networkId);
return nes.Snapshot.GetValueAsync(cancellationToken);
}
- private NetworkEndpointSnapshot GetSnapshotFor(NetworkIdentifier networkID)
+ private NetworkEndpointSnapshot GetSnapshotFor(NetworkIdentifier networkId)
{
lock (_snapshots)
{
- var nes = _snapshots.FirstOrDefault(s => s.NetworkID.Equals(networkID));
+ var nes = _snapshots.FirstOrDefault(s => s.NetworkID.Equals(networkId));
if (nes is null)
{
- nes = new NetworkEndpointSnapshot(new ValueSnapshot(), networkID);
+ nes = new NetworkEndpointSnapshot(new ValueSnapshot(), networkId);
_snapshots.Add(nes);
}
return nes;
diff --git a/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs b/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs
index 6ae84bf893d..38bf5581644 100644
--- a/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs
+++ b/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs
@@ -16,7 +16,7 @@ public sealed class EndpointReference : IExpressionValue, IManifestExpressionPro
// A reference to the endpoint annotation if it exists.
private EndpointAnnotation? _endpointAnnotation;
private bool? _isAllocated;
- private readonly NetworkIdentifier? _contextNetworkID;
+ private readonly NetworkIdentifier? _contextNetworkId;
///
/// Gets the endpoint annotation associated with the endpoint reference.
@@ -129,7 +129,7 @@ private string BuildMissingEndpointMessage()
/// The reference will be resolved in the context of this network, which may be different
/// from the network associated with the default network of the referenced Endpoint.
///
- public NetworkIdentifier? ContextNetworkID => _contextNetworkID;
+ public NetworkIdentifier? ContextNetworkID => _contextNetworkId;
///
/// Gets the specified property expression of the endpoint.
@@ -244,7 +244,7 @@ public ReferenceExpression GetTlsValue(ReferenceExpression enabledValue, Referen
foreach (var nes in endpointAnnotation.AllAllocatedEndpoints)
{
- if (string.Equals(nes.NetworkID.Value, (_contextNetworkID ?? KnownNetworkIdentifiers.LocalhostNetwork).Value, StringComparisons.NetworkID))
+ if (string.Equals(nes.NetworkID.Value, (_contextNetworkId ?? KnownNetworkIdentifiers.LocalhostNetwork).Value, StringComparisons.NetworkId))
{
if (!nes.Snapshot.IsValueSet)
{
@@ -263,14 +263,14 @@ public ReferenceExpression GetTlsValue(ReferenceExpression enabledValue, Referen
///
/// The resource with endpoints that owns the referenced endpoint.
/// The endpoint annotation.
- /// The ID of the network that serves as the context for the EndpointReference.
+ /// The ID of the network that serves as the context for the EndpointReference.
///
/// Most Aspire resources are accessed in the context of the "localhost" network (host processes calling other host processes,
/// or host processes calling container via mapped ports). If a is specified, the
/// will always resolve in the context of that network. If the is null, the reference will attempt to resolve itself
/// based on the context of the requesting resource.
///
- public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint, NetworkIdentifier? contextNetworkID)
+ public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint, NetworkIdentifier? contextNetworkId)
{
ArgumentNullException.ThrowIfNull(owner);
ArgumentNullException.ThrowIfNull(endpoint);
@@ -278,7 +278,7 @@ public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoi
Resource = owner;
EndpointName = endpoint.Name;
_endpointAnnotation = endpoint;
- _contextNetworkID = contextNetworkID;
+ _contextNetworkId = contextNetworkId;
}
///
@@ -295,21 +295,21 @@ public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoi
///
/// The resource with endpoints that owns the referenced endpoint.
/// The name of the endpoint.
- /// The ID of the network that serves as the context for the EndpointReference.
+ /// The ID of the network that serves as the context for the EndpointReference.
///
/// Most Aspire resources are accessed in the context of the "localhost" network (host proceses calling other host processes,
/// or host processes calling container via mapped ports). This is why EndpointReference assumes this
/// context unless specified otherwise. However, for container-to-container, or container-to-host communication,
/// you must specify a container network context for the EndpointReference to be resolved correctly.
///
- public EndpointReference(IResourceWithEndpoints owner, string endpointName, NetworkIdentifier? contextNetworkID = null)
+ public EndpointReference(IResourceWithEndpoints owner, string endpointName, NetworkIdentifier? contextNetworkId = null)
{
ArgumentNullException.ThrowIfNull(owner);
ArgumentNullException.ThrowIfNull(endpointName);
Resource = owner;
EndpointName = endpointName;
- _contextNetworkID = contextNetworkID;
+ _contextNetworkId = contextNetworkId;
}
///
diff --git a/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs b/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs
index beb2c2fc1d3..ef3eae38416 100644
--- a/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs
+++ b/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs
@@ -24,10 +24,10 @@ public sealed class EndpointReferenceAnnotation(IResourceWithEndpoints resource)
///
/// Gets the set of specific endpoint names that are referenced. When is , this set is ignored.
///
- public HashSet EndpointNames { get; } = new(StringComparers.EndpointAnnotationName);
+ public ISet EndpointNames { get; } = new HashSet(StringComparers.EndpointAnnotationName);
///
/// Gets or sets the network identifier used as context for resolving endpoint addresses.
///
- public NetworkIdentifier ContextNetworkID { get; set; } = KnownNetworkIdentifiers.LocalhostNetwork;
+ public NetworkIdentifier ContextNetworkId { get; set; } = KnownNetworkIdentifiers.LocalhostNetwork;
}
diff --git a/src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs b/src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs
index ee946810e99..8533253d008 100644
--- a/src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs
+++ b/src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs
@@ -721,14 +721,14 @@ public static IEnumerable GetEndpoints(this IResourceWithEndp
/// Gets references to all endpoints for the specified resource.
///
/// The which contains annotations.
- /// The ID of the network that serves as the context context for the endpoint references.
+ /// The ID of the network that serves as the context context for the endpoint references.
/// An enumeration of based on the annotations from the resources' collection.
[AspireExportIgnore(Reason = "Network-specific endpoint enumeration is not part of the ATS surface.")]
- public static IEnumerable GetEndpoints(this IResourceWithEndpoints resource, NetworkIdentifier contextNetworkID)
+ public static IEnumerable GetEndpoints(this IResourceWithEndpoints resource, NetworkIdentifier contextNetworkId)
{
if (TryGetAnnotationsOfType(resource, out var endpoints))
{
- return endpoints.Select(e => new EndpointReference(resource, e, contextNetworkID));
+ return endpoints.Select(e => new EndpointReference(resource, e, contextNetworkId));
}
return [];
@@ -761,10 +761,10 @@ public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource
///
/// The which contains annotations.
/// The name of the endpoint.
- /// The network ID of the network that provides the context for the returned
+ /// The network ID of the network that provides the context for the returned
/// An object providing resolvable reference for the specified endpoint.
[AspireExportIgnore(Reason = "Network-specific endpoint lookup is not part of the ATS surface.")]
- public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName, NetworkIdentifier contextNetworkID)
+ public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName, NetworkIdentifier contextNetworkId)
{
var endpoint = resource.TryGetEndpoints(out var endpoints) ?
@@ -772,11 +772,11 @@ public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource
null;
if (endpoint is null)
{
- return new EndpointReference(resource, endpointName, contextNetworkID);
+ return new EndpointReference(resource, endpointName, contextNetworkId);
}
else
{
- return new EndpointReference(resource, endpoint, contextNetworkID);
+ return new EndpointReference(resource, endpoint, contextNetworkId);
}
}
diff --git a/src/Aspire.Hosting/ApplicationModel/ResourceUrlsCallbackContext.cs b/src/Aspire.Hosting/ApplicationModel/ResourceUrlsCallbackContext.cs
index 56c699365e3..b36abae189b 100644
--- a/src/Aspire.Hosting/ApplicationModel/ResourceUrlsCallbackContext.cs
+++ b/src/Aspire.Hosting/ApplicationModel/ResourceUrlsCallbackContext.cs
@@ -41,11 +41,11 @@ public class ResourceUrlsCallbackContext(DistributedApplicationExecutionContext
/// If does not implement then returns null.
///
/// The name of the endpoint.
- /// The identifier of the network that serves as the context for the endpoint reference.
- public EndpointReference? GetEndpoint(string name, NetworkIdentifier contextNetworkID) =>
+ /// The identifier of the network that serves as the context for the endpoint reference.
+ public EndpointReference? GetEndpoint(string name, NetworkIdentifier contextNetworkId) =>
Resource switch
{
- IResourceWithEndpoints resourceWithEndpoints => resourceWithEndpoints.GetEndpoint(name, contextNetworkID),
+ IResourceWithEndpoints resourceWithEndpoints => resourceWithEndpoints.GetEndpoint(name, contextNetworkId),
_ => null
};
diff --git a/src/Aspire.Hosting/CompatibilitySuppressions.xml b/src/Aspire.Hosting/CompatibilitySuppressions.xml
index 8ecd3607985..0497d618a92 100644
--- a/src/Aspire.Hosting/CompatibilitySuppressions.xml
+++ b/src/Aspire.Hosting/CompatibilitySuppressions.xml
@@ -1,32 +1,3 @@
-
-
- CP0006
- M:Aspire.Hosting.Pipelines.IDeploymentStateManager.ClearAllStateAsync(System.Threading.CancellationToken)
- lib/net8.0/Aspire.Hosting.dll
- lib/net8.0/Aspire.Hosting.dll
- true
-
-
- CP0006
- M:Aspire.Hosting.Publishing.IContainerRuntime.ComposeDownAsync(Aspire.Hosting.Publishing.ComposeOperationContext,System.Threading.CancellationToken)
- lib/net8.0/Aspire.Hosting.dll
- lib/net8.0/Aspire.Hosting.dll
- true
-
-
- CP0006
- M:Aspire.Hosting.Publishing.IContainerRuntime.ComposeListServicesAsync(Aspire.Hosting.Publishing.ComposeOperationContext,System.Threading.CancellationToken)
- lib/net8.0/Aspire.Hosting.dll
- lib/net8.0/Aspire.Hosting.dll
- true
-
-
- CP0006
- M:Aspire.Hosting.Publishing.IContainerRuntime.ComposeUpAsync(Aspire.Hosting.Publishing.ComposeOperationContext,System.Threading.CancellationToken)
- lib/net8.0/Aspire.Hosting.dll
- lib/net8.0/Aspire.Hosting.dll
- true
-
-
+
\ No newline at end of file
diff --git a/src/Aspire.Hosting/Dcp/DcpModelUtilities.cs b/src/Aspire.Hosting/Dcp/DcpModelUtilities.cs
index 6801c2b6768..f0f8171ffa0 100644
--- a/src/Aspire.Hosting/Dcp/DcpModelUtilities.cs
+++ b/src/Aspire.Hosting/Dcp/DcpModelUtilities.cs
@@ -312,7 +312,7 @@ ts.Service is not null &&
throw new InvalidDataException($"The '{endpoint.Name}' on resource '{ts.ResourceName}' should have an associated DCP Service resource already set up");
}
- var networkID = new NetworkIdentifier(ts.ContainerNetworkName!);
+ var networkId = new NetworkIdentifier(ts.ContainerNetworkName!);
var address = string.IsNullOrEmpty(ts.TunnelInstanceName) ? containerHostName : KnownHostNames.DefaultContainerTunnelHostName;
var port = (int)ts.Service!.AllocatedPort!;
@@ -322,9 +322,9 @@ ts.Service is not null &&
port,
EndpointBindingMode.SingleAddress,
targetPortExpression: $$$"""{{- portForServing "{{{ts.Service.Metadata.Name}}}" -}}""",
- networkID
+ networkId
);
- endpoint.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(networkID, tunnelAllocatedEndpoint);
+ endpoint.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(networkId, tunnelAllocatedEndpoint);
}
}
}
diff --git a/src/Aspire.Hosting/ResourceBuilderExtensions.cs b/src/Aspire.Hosting/ResourceBuilderExtensions.cs
index 7eafe2ee5a0..d583bc09143 100644
--- a/src/Aspire.Hosting/ResourceBuilderExtensions.cs
+++ b/src/Aspire.Hosting/ResourceBuilderExtensions.cs
@@ -812,7 +812,7 @@ private static Action CreateEndpointReferenceEnviron
// Track per-scheme index for service discovery keys to handle multiple endpoints with the same scheme.
var schemeIndexTracker = new Dictionary(StringComparer.OrdinalIgnoreCase);
- foreach (var endpoint in annotation.Resource.GetEndpoints(annotation.ContextNetworkID))
+ foreach (var endpoint in annotation.Resource.GetEndpoints(annotation.ContextNetworkId))
{
if (specificEndpointName != null && !string.Equals(endpoint.EndpointName, specificEndpointName, StringComparison.OrdinalIgnoreCase))
{
@@ -1407,7 +1407,7 @@ private static void ApplyEndpoints(this IResourceBuilder builder, IResourc
endpointReferenceAnnotation = new EndpointReferenceAnnotation(resourceWithEndpoints);
if (builder.Resource.IsContainer())
{
- endpointReferenceAnnotation.ContextNetworkID = KnownNetworkIdentifiers.DefaultAspireContainerNetwork;
+ endpointReferenceAnnotation.ContextNetworkId = KnownNetworkIdentifiers.DefaultAspireContainerNetwork;
}
builder.WithAnnotation(endpointReferenceAnnotation);
@@ -1482,7 +1482,7 @@ public static IResourceBuilder WithEndpoint(this IResourceBuilder build
// can also be resolved in the context of container-to-container communication by using the target port
// and the container name as the host. This is why we only set the context network to localhost,
// for both container and non-container resources.
- endpoint = new EndpointAnnotation(ProtocolType.Tcp, name: endpointName, networkID: KnownNetworkIdentifiers.LocalhostNetwork);
+ endpoint = new EndpointAnnotation(ProtocolType.Tcp, name: endpointName, networkId: KnownNetworkIdentifiers.LocalhostNetwork);
callback(endpoint);
builder.Resource.Annotations.Add(endpoint);
}
@@ -1612,7 +1612,7 @@ public static IResourceBuilder WithEndpoint(this IResourceBuilder build
targetPort: targetPort,
isExternal: isExternal,
isProxied: isProxied,
- networkID: KnownNetworkIdentifiers.LocalhostNetwork);
+ networkId: KnownNetworkIdentifiers.LocalhostNetwork);
ConfigureEndpointEnvironmentVariable(builder, annotation, env);
@@ -1885,15 +1885,15 @@ public static IResourceBuilder WithExternalHttpEndpoints(this IResourceBui
/// The resource type.
/// The the resource builder.
/// The name of the endpoint.
- /// The network context in which to resolve the endpoint. If null, localhost (loopback) network context will be used.
+ /// The network context in which to resolve the endpoint. If null, localhost (loopback) network context will be used.
/// An that can be used to resolve the address of the endpoint after resource allocation has occurred.
/// This method is not available in polyglot app hosts. Use the overload without NetworkIdentifier instead.
[AspireExportIgnore(Reason = "NetworkIdentifier is not ATS-compatible.")]
- public static EndpointReference GetEndpoint(this IResourceBuilder builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints
+ public static EndpointReference GetEndpoint(this IResourceBuilder builder, [EndpointName] string name, NetworkIdentifier contextNetworkId) where T : IResourceWithEndpoints
{
ArgumentNullException.ThrowIfNull(builder);
- return builder.Resource.GetEndpoint(name, contextNetworkID);
+ return builder.Resource.GetEndpoint(name, contextNetworkId);
}
///
@@ -4888,7 +4888,7 @@ public static IResourceBuilder WithHidden(this IResourceBuilder builder
///
/// The resource type.
/// The resource builder.
- /// The completion exit code to treat as successful. Defaults to 0.
+ /// The completion exit code to treat as successful.
/// The .
///
/// This method is useful for one-off resources such as setup scripts, migrations, or build steps that should remain visible while running
@@ -4896,7 +4896,7 @@ public static IResourceBuilder WithHidden(this IResourceBuilder builder
/// Hidden resources can still be accessed directly by their name, by using Show hidden resources toggle in the dashboard or by using aspire describe --include-hidden from the CLI.
///
[AspireExportIgnore(Reason = "Use ATS-friendly overload that supports a single exit code or multiple exit codes.")]
- public static IResourceBuilder WithHiddenOnCompletion(this IResourceBuilder builder, int exitCode = 0) where T : IResource
+ public static IResourceBuilder WithHiddenOnCompletion(this IResourceBuilder builder, int exitCode) where T : IResource
{
ArgumentNullException.ThrowIfNull(builder);
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 95bf20eb97a..aee31ca53ab 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -4,7 +4,7 @@
true
true
- 13.2.2
+ 13.3.5
diff --git a/src/Shared/StringComparers.cs b/src/Shared/StringComparers.cs
index 41ef4ed1f9a..f57c5542866 100644
--- a/src/Shared/StringComparers.cs
+++ b/src/Shared/StringComparers.cs
@@ -32,7 +32,7 @@ internal static class StringComparers
public static StringComparer CommandName => StringComparer.Ordinal;
public static StringComparer CliInputOrOutput => StringComparer.Ordinal;
public static StringComparer InteractionInputName => StringComparer.OrdinalIgnoreCase;
- public static StringComparer NetworkID => StringComparer.Ordinal;
+ public static StringComparer NetworkId => StringComparer.Ordinal;
public static StringComparer NuGetPackageId => StringComparer.OrdinalIgnoreCase;
public static StringComparer FullTextSearch => StringComparer.OrdinalIgnoreCase;
public static StringComparer ChannelName => StringComparer.OrdinalIgnoreCase;
@@ -65,7 +65,7 @@ internal static class StringComparisons
public static StringComparison CommandName => StringComparison.Ordinal;
public static StringComparison CliInputOrOutput => StringComparison.Ordinal;
public static StringComparison InteractionInputName => StringComparison.OrdinalIgnoreCase;
- public static StringComparison NetworkID => StringComparison.Ordinal;
+ public static StringComparison NetworkId => StringComparison.Ordinal;
public static StringComparison NuGetPackageId => StringComparison.OrdinalIgnoreCase;
public static StringComparison FullTextSearch => StringComparison.OrdinalIgnoreCase;
public static StringComparison ChannelName => StringComparison.OrdinalIgnoreCase;
diff --git a/tests/Aspire.Hosting.Azure.Tests/AzurePostgresExtensionsTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzurePostgresExtensionsTests.cs
index f0b79fa665d..01062779b87 100644
--- a/tests/Aspire.Hosting.Azure.Tests/AzurePostgresExtensionsTests.cs
+++ b/tests/Aspire.Hosting.Azure.Tests/AzurePostgresExtensionsTests.cs
@@ -371,7 +371,7 @@ public async Task WithPostgresMcpOnAzureDatabaseRunAsContainerAddsMcpResource()
c.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5432);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "postgres.dev.internal", 5432, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "postgres.dev.internal", 5432, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
});
diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs
index 0710044f720..d9124efcf24 100644
--- a/tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs
+++ b/tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs
@@ -1,4 +1,5 @@
#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.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
diff --git a/tests/Aspire.Hosting.Azure.Tests/RoleAssignmentTests.cs b/tests/Aspire.Hosting.Azure.Tests/RoleAssignmentTests.cs
index 4bde4eea3ce..95fad316307 100644
--- a/tests/Aspire.Hosting.Azure.Tests/RoleAssignmentTests.cs
+++ b/tests/Aspire.Hosting.Azure.Tests/RoleAssignmentTests.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.Text.Json.Nodes;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Utils;
diff --git a/tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs b/tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs
index 7d5c7449d1a..4bf0292ed27 100644
--- a/tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs
+++ b/tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs
@@ -564,7 +564,7 @@ public async Task WithReferenceDispatchesNodeAppServiceReference()
.WithEndpoint("http", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5031);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "nodeapp.dev.internal", 5031, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "nodeapp.dev.internal", 5031, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var consumer = builder.AddContainer("consumer", "fake");
diff --git a/tests/Aspire.Hosting.Milvus.Tests/AddMilvusTests.cs b/tests/Aspire.Hosting.Milvus.Tests/AddMilvusTests.cs
index 6eb39f1c5c0..723a0b01480 100644
--- a/tests/Aspire.Hosting.Milvus.Tests/AddMilvusTests.cs
+++ b/tests/Aspire.Hosting.Milvus.Tests/AddMilvusTests.cs
@@ -99,7 +99,7 @@ public async Task MilvusClientAppWithReferenceContainsConnectionStrings()
.WithEndpoint("grpc", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", MilvusPortGrpc);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-milvus.dev.internal", MilvusPortGrpc, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-milvus.dev.internal", MilvusPortGrpc, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var projectA = appBuilder.AddProject("projecta", o => o.ExcludeLaunchProfile = true)
diff --git a/tests/Aspire.Hosting.PostgreSQL.Tests/AddPostgresTests.cs b/tests/Aspire.Hosting.PostgreSQL.Tests/AddPostgresTests.cs
index fd64a45cb51..dcae09ba2b7 100644
--- a/tests/Aspire.Hosting.PostgreSQL.Tests/AddPostgresTests.cs
+++ b/tests/Aspire.Hosting.PostgreSQL.Tests/AddPostgresTests.cs
@@ -195,7 +195,7 @@ public async Task WithReferenceDispatchesPostgresDatabaseReference()
.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 2000);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "postgres.dev.internal", 2000, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "postgres.dev.internal", 2000, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var database = postgres.AddDatabase("db");
var consumer = appBuilder.AddContainer("consumer", "fake");
diff --git a/tests/Aspire.Hosting.PostgreSQL.Tests/PostgresMcpBuilderTests.cs b/tests/Aspire.Hosting.PostgreSQL.Tests/PostgresMcpBuilderTests.cs
index 987bc894af0..c68d64b347d 100644
--- a/tests/Aspire.Hosting.PostgreSQL.Tests/PostgresMcpBuilderTests.cs
+++ b/tests/Aspire.Hosting.PostgreSQL.Tests/PostgresMcpBuilderTests.cs
@@ -78,7 +78,7 @@ public async Task WithPostgresMcpOnDatabaseSetsDatabaseUriEnvironmentVariable()
.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5432);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "postgres.dev.internal", 5432, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "postgres.dev.internal", 5432, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
})
.AddDatabase("db")
.WithPostgresMcp();
diff --git a/tests/Aspire.Hosting.Qdrant.Tests/AddQdrantTests.cs b/tests/Aspire.Hosting.Qdrant.Tests/AddQdrantTests.cs
index f7d9bec19c2..0dd939873e8 100644
--- a/tests/Aspire.Hosting.Qdrant.Tests/AddQdrantTests.cs
+++ b/tests/Aspire.Hosting.Qdrant.Tests/AddQdrantTests.cs
@@ -179,12 +179,12 @@ public async Task QdrantClientAppWithReferenceContainsConnectionStrings()
.WithEndpoint("grpc", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6334);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6334, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6334, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
})
.WithEndpoint("http", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6333);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6333, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6333, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var projectA = appBuilder.AddProject("projecta", o => o.ExcludeLaunchProfile = true)
@@ -223,12 +223,12 @@ public async Task WithReferenceDispatchesQdrantReference()
.WithEndpoint("grpc", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6334);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6334, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6334, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
})
.WithEndpoint("http", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6333);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6333, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "my-qdrant.dev.internal", 6333, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var consumer = appBuilder.AddContainer("consumer", "fake");
diff --git a/tests/Aspire.Hosting.Redis.Tests/AddRedisTests.cs b/tests/Aspire.Hosting.Redis.Tests/AddRedisTests.cs
index 6cfea90b8c9..22524207136 100644
--- a/tests/Aspire.Hosting.Redis.Tests/AddRedisTests.cs
+++ b/tests/Aspire.Hosting.Redis.Tests/AddRedisTests.cs
@@ -278,17 +278,17 @@ public async Task WithRedisInsightProducesCorrectEnvironmentVariables()
redis1.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5001);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "myredis1.dev.internal", 5001, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "myredis1.dev.internal", 5001, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
redis2.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5002);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "myredis2.dev.internal", 5002, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "myredis2.dev.internal", 5002, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
redis3.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 5003);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "myredis3.dev.internal", 5003, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "myredis3.dev.internal", 5003, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var redisInsight = Assert.Single(builder.Resources.OfType());
@@ -706,7 +706,7 @@ public async Task RedisInsightEnvironmentCallbackIsIdempotent()
.WithEndpoint("tcp", e =>
{
e.AllocatedEndpoint = new AllocatedEndpoint(e, "localhost", 6379);
- e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "redis.dev.internal", 6379, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ e.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(e, "redis.dev.internal", 6379, EndpointBindingMode.SingleAddress, targetPortExpression: null, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
})
.WithRedisInsight();
diff --git a/tests/Aspire.Hosting.Tests/EndpointReferenceTests.cs b/tests/Aspire.Hosting.Tests/EndpointReferenceTests.cs
index 2419809d65d..20ebd634d62 100644
--- a/tests/Aspire.Hosting.Tests/EndpointReferenceTests.cs
+++ b/tests/Aspire.Hosting.Tests/EndpointReferenceTests.cs
@@ -297,7 +297,7 @@ public void AllocatedEndpoint_ThrowsWhenNetworkIdDoesNotMatch()
annotation, "localhost", 8080,
EndpointBindingMode.SingleAddress,
targetPortExpression: null,
- networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork);
+ networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork);
var ex = Assert.Throws(() => annotation.AllocatedEndpoint = mismatchedEndpoint);
}
diff --git a/tests/Aspire.Hosting.Tests/WithEnvironmentTests.cs b/tests/Aspire.Hosting.Tests/WithEnvironmentTests.cs
index 086b5f427f1..068b4facd6d 100644
--- a/tests/Aspire.Hosting.Tests/WithEnvironmentTests.cs
+++ b/tests/Aspire.Hosting.Tests/WithEnvironmentTests.cs
@@ -230,7 +230,7 @@ public async Task EnvironmentVariableExpressions()
{
ep.AllocatedEndpoint = new AllocatedEndpoint(ep, "localhost", 17454);
- ep.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(ep, "container1.dev.internal", 10005, EndpointBindingMode.SingleAddress, networkID: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
+ ep.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.DefaultAspireContainerNetwork, new AllocatedEndpoint(ep, "container1.dev.internal", 10005, EndpointBindingMode.SingleAddress, networkId: KnownNetworkIdentifiers.DefaultAspireContainerNetwork));
});
var endpoint = container.GetEndpoint("primary");