Skip to content

Update diagnostic URLs #9179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Aspire.AppHost.Sdk/SDK/Sdk.in.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
</ItemGroup>

<Target Name="__WarnOnAspireCapabilityMissing" BeforeTargets="PrepareForBuild" Condition="!@(ProjectCapability->AnyHaveMetadataValue('Identity', 'Aspire'))">
<Warning Code="ASPIRE002" Text="$(MSBuildProjectName) is an Aspire AppHost project but necessary dependencies aren't present. Are you missing an Aspire.Hosting.AppHost PackageReference?" />
<Warning Code="ASPIRE002" Text="$(MSBuildProjectName) is an Aspire AppHost project but necessary dependencies aren't present. Are you missing an Aspire.Hosting.AppHost PackageReference?" HelpLink="https://aka.ms/aspire/diagnostics/aspire002" />
</Target>

<Target Name="__WarnOnMininumVsVersionMissing" BeforeTargets="PrepareForBuild" Condition="'$(BuildingInsideVisualStudio)' == 'true' and $([MSBuild]::VersionLessThan('$(MSBuildVersion)', '17.10.0'))">
<Warning Code="ASPIRE003" Text="$(MSBuildProjectName) is a .NET Aspire AppHost project that requires Visual Studio version 17.10 or above to work correctly. You are using version $(MSBuildVersion)." />
<Warning Code="ASPIRE003" Text="$(MSBuildProjectName) is a .NET Aspire AppHost project that requires Visual Studio version 17.10 or above to work correctly. You are using version $(MSBuildVersion)." HelpLink="https://aka.ms/aspire/diagnostics/aspire003" />
</Target>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal static class Diagnostics
category: "Design",
DiagnosticSeverity.Error,
isEnabledByDefault: true,
helpLinkUri: $"https://aka.ms/dotnet/aspire/diagnostics#{ModelNameMustBeValidId}");
helpLinkUri: $"https://aka.ms/aspire/diagnostics/{ModelNameMustBeValidId}");

public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create(
s_modelNameMustBeValid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace Projects%3B
</Target>

<Target Name="_WarnOnUnsupportedLanguage" Condition="'$(Language)' != 'C#'">
<Warning Code="ASPIRE001" Text="The '$(Language)' language isn't fully supported by Aspire - some code generation targets will not run, so will require manual authoring." />
<Warning Code="ASPIRE001" Text="The '$(Language)' language isn't fully supported by Aspire - some code generation targets will not run, so will require manual authoring." HelpLink="https://aka.ms/aspire/diagnostics/aspire001" />
</Target>

<!--
Expand Down Expand Up @@ -178,7 +178,8 @@ namespace Projects%3B

<Warning Code="ASPIRE004"
Condition="'@(_AspireNonExecutableProjectResource)' != ''"
Text="'%(_AspireNonExecutableProjectResource.OriginalItemSpec)' is referenced by an Aspire Host project, but it is not an executable. Did you mean to set IsAspireProjectResource=&quot;false&quot;?" />
Text="'%(_AspireNonExecutableProjectResource.OriginalItemSpec)' is referenced by an Aspire Host project, but it is not an executable. Did you mean to set IsAspireProjectResource=&quot;false&quot;?"
HelpLink="https://aka.ms/aspire/diagnostics/aspire004" />
</Target>

<PropertyGroup>
Expand Down Expand Up @@ -270,7 +271,8 @@ namespace Projects%3B
Condition="'$(IsAspireHost)' == 'true' and ('$(AspireHostingSDKVersion)' == '' or $([MSBuild]::VersionLessThan('$(AspireHostingSDKVersion)', '9.0.0')))">
<Error Code="ASPIRE007"
Text="$(MSBuildProjectName) project requires a reference to &quot;Aspire.AppHost.Sdk&quot; with version &quot;9.0.0&quot; or greater to work correctly. Please add the following line after the Project declaration `&lt;Sdk Name=&quot;Aspire.AppHost.Sdk&quot; Version=&quot;9.0.0&quot; /&gt;`."
File="$(MSBuildProjectFullPath)" />
File="$(MSBuildProjectFullPath)"
HelpLink="https://aka.ms/aspire/diagnostics/aspire007" />
</Target>

<!-- Entrypoint to allow for generation of an aspire manifest to a given location -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static class ContainerAppExtensions
/// </code>
/// </example>
/// </remarks>
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static void ConfigureCustomDomain(this ContainerApp app, IResourceBuilder<ParameterResource> customDomain, IResourceBuilder<ParameterResource> certificateName)
{
ArgumentNullException.ThrowIfNull(app);
Expand Down
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResour
/// <remarks>
/// This version of the package defaults to the <inheritdoc cref="CosmosDBEmulatorContainerImageTags.TagVNextPreview"/> tag of the <inheritdoc cref="CosmosDBEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="CosmosDBEmulatorContainerImageTags.Image"/> container image.
/// </remarks>
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<AzureCosmosDBResource> RunAsPreviewEmulator(this IResourceBuilder<AzureCosmosDBResource> builder, Action<IResourceBuilder<AzureCosmosDBEmulatorResource>>? configureContainer = null)
=> RunAsEmulator(builder, configureContainer, useVNextPreview: true);

Expand Down Expand Up @@ -289,7 +289,7 @@ public static IResourceBuilder<AzureCosmosDBContainerResource> AddContainer(this
/// <remarks>
/// The Data Explorer is only available with <see cref="RunAsPreviewEmulator"/>.
/// </remarks>
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<AzureCosmosDBEmulatorResource> WithDataExplorer(this IResourceBuilder<AzureCosmosDBEmulatorResource> builder, int? port = null)
{
ArgumentNullException.ThrowIfNull(builder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class AzureEnvironmentResourceExtensions
/// </summary>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
/// <returns>The <see cref="IResourceBuilder{AzureEnvironmentResource}"/>.</returns>
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<AzureEnvironmentResource> AddAzureEnvironment(this IDistributedApplicationBuilder builder)
{
if (builder.Resources.OfType<AzureEnvironmentResource>().SingleOrDefault() is { } existingResource)
Expand Down Expand Up @@ -56,7 +56,7 @@ public static IResourceBuilder<AzureEnvironmentResource> AddAzureEnvironment(thi
/// This method is used to set the location of the Azure environment resource.
/// The location is used to determine where the resources will be deployed.
/// </remarks>
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<AzureEnvironmentResource> WithLocation(
this IResourceBuilder<AzureEnvironmentResource> builder,
IResourceBuilder<ParameterResource> location)
Expand All @@ -79,7 +79,7 @@ public static IResourceBuilder<AzureEnvironmentResource> WithLocation(
/// This method is used to set the resource group name of the Azure environment resource.
/// The resource group name is used to determine where the resources will be deployed.
/// </remarks>
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<AzureEnvironmentResource> WithResourceGroup(
this IResourceBuilder<AzureEnvironmentResource> builder,
IResourceBuilder<ParameterResource> resourceGroup)
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure/AzurePublisherOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Aspire.Hosting.Azure;
/// <summary>
/// Options which control generation of artifacts for deploying to Azure.
/// </summary>
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public sealed class AzurePublisherOptions : PublishingOptions
{
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure/AzurePublishingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Aspire.Hosting.Azure;
/// publisher options, and execution context. It handles resource configuration and ensures
/// that the bicep template is created in the specified output path.
/// </remarks>
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREAZURE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public sealed class AzurePublishingContext(
AzurePublisherOptions publisherOptions,
AzureProvisioningOptions provisioningOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure/IAzureContainerRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Aspire.Hosting.Azure;
/// <summary>
/// Represents Azure Container Registry information for deployment targets.
/// </summary>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public interface IAzureContainerRegistry : IContainerRegistry
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Python/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

using System.Diagnostics.CodeAnalysis;

[assembly: Experimental("ASPIREHOSTINGPYTHON001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[assembly: Experimental("ASPIREHOSTINGPYTHON001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Aspire.Hosting.ApplicationModel;

[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
internal sealed class ComputeEnvironmentAnnotation(IComputeEnvironmentResource computeEnvironment) : IResourceAnnotation
{
public IComputeEnvironmentResource ComputeEnvironment { get; } = computeEnvironment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public sealed class DeploymentTargetAnnotation(IResource target) : IResourceAnno
/// Gets or sets the container registry information associated with
/// the deployment target, if the deployment target is an image-based environment.
/// </summary>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public IContainerRegistry? ContainerRegistry { get; set; }

/// <summary>
/// Gets or sets the compute environment resource associated with the deployment target.
/// </summary>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public IComputeEnvironmentResource? ComputeEnvironment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Aspire.Hosting.ApplicationModel;
/// <summary>
/// Represents a compute environment resource.
/// </summary>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public interface IComputeEnvironmentResource : IResource
{
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/ApplicationModel/IComputeResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Aspire.Hosting.ApplicationModel;
/// A compute resource is a resource that can be hosted/executed on an <see cref="IComputeEnvironmentResource"/>. Examples
/// include projects, containers, and other resources that can be executed on a compute environment.
/// </remarks>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public interface IComputeResource : IResource
{
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/ApplicationModel/IContainerRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Aspire.Hosting.ApplicationModel;
/// <summary>
/// Represents container registry information for deployment targets.
/// </summary>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public interface IContainerRegistry
{
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Aspire.Hosting/ApplicationModel/ProxySupportAnnotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ public sealed class ProxySupportAnnotation : IResourceAnnotation
/// <summary>
/// Create a new instance of the <see cref="ProxySupportAnnotation"/> class.
/// </summary>
[Experimental("ASPIREPROXYENDPOINTS001")]
[Experimental("ASPIREPROXYENDPOINTS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public ProxySupportAnnotation()
{}

/// <summary>
/// Gets or sets the value indicating whether the proxy support is enabled for the resource.
/// </summary>
public required bool ProxyEnabled { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/ContainerResourceBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ public static IResourceBuilder<T> WithContainerFiles<T>(this IResourceBuilder<T>
/// The user needs to be careful to ensure that container endpoints are using unique ports when disabling proxy support as by default for proxy-less
/// endpoints, Aspire will allocate the internal container port as the host port, which will increase the chance of port conflicts.
/// </remarks>
[Experimental("ASPIREPROXYENDPOINTS001")]
[Experimental("ASPIREPROXYENDPOINTS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<T> WithEndpointProxySupport<T>(this IResourceBuilder<T> builder, bool proxyEnabled) where T : ContainerResource
{
ArgumentNullException.ThrowIfNull(builder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static class PublisherDistributedApplicationBuilderExtensions
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>. </param>
/// <param name="name">The name of the publisher.</param>
/// <param name="configureOptions">Callback to configure options for the publisher.</param>
[Experimental("ASPIREPUBLISHERS001")]
[Experimental("ASPIREPUBLISHERS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IDistributedApplicationBuilder AddPublisher<TPublisher, TPublisherOptions>(this IDistributedApplicationBuilder builder, string name, Action<TPublisherOptions>? configureOptions = null)
where TPublisher : class, IDistributedApplicationPublisher
where TPublisherOptions : class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Aspire.Hosting.Publishing;
/// <summary>
/// Minimalistic reporter that does nothing.
/// </summary>
[Experimental("ASPIREPUBLISHERS001")]
[Experimental("ASPIREPUBLISHERS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public sealed class NullPublishingActivityProgressReporter : IPublishingActivityProgressReporter
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Aspire.Hosting.Publishing;
/// <summary>
/// Represents a publishing activity.
/// </summary>
[Experimental("ASPIREPUBLISHERS001")]
[Experimental("ASPIREPUBLISHERS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public sealed class PublishingActivity
{
/// <summary>
Expand Down Expand Up @@ -44,7 +44,7 @@ public PublishingActivity(string id, bool isPrimary = false)
/// <summary>
/// Represents the status of a publishing activity.
/// </summary>
[Experimental("ASPIREPUBLISHERS001")]
[Experimental("ASPIREPUBLISHERS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public sealed record PublishingActivityStatus
{
/// <summary>
Expand All @@ -71,7 +71,7 @@ public sealed record PublishingActivityStatus
/// <summary>
/// Interface for reporting publishing activity progress.
/// </summary>
[Experimental("ASPIREPUBLISHERS001")]
[Experimental("ASPIREPUBLISHERS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public interface IPublishingActivityProgressReporter
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Aspire.Hosting.Publishing;
/// <summary>
/// Provides a service to publishers for building containers that represent a resource.
/// </summary>
[Experimental("ASPIREPUBLISHERS001")]
[Experimental("ASPIREPUBLISHERS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public interface IResourceContainerImageBuilder
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/ResourceBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ public static IResourceBuilder<T> WithParentRelationship<T>(
/// <remarks>
/// This method allows associating a specific compute environment with the compute resource.
/// </remarks>
[Experimental("ASPIRECOMPUTE001")]
[Experimental("ASPIRECOMPUTE001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public static IResourceBuilder<T> WithComputeEnvironment<T>(this IResourceBuilder<T> builder, IResourceBuilder<IComputeEnvironmentResource> computeEnvironmentResource)
where T : IComputeResource
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void PublishAsAzureContainerAppForProjectShouldThrowWhenConfigureIsNull()
}

[Fact]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public void ConfigureCustomDomainShouldThrowWhenAppIsNull()
{
using var builder = TestDistributedApplicationBuilder.Create();
Expand All @@ -128,7 +128,7 @@ public void ConfigureCustomDomainShouldThrowWhenAppIsNull()
}

[Fact]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public void ConfigureCustomDomainShouldThrowWhenCustomDomainIsNull()
{
using var builder = TestDistributedApplicationBuilder.Create();
Expand All @@ -143,7 +143,7 @@ public void ConfigureCustomDomainShouldThrowWhenCustomDomainIsNull()
}

[Fact]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public void ConfigureCustomDomainShouldThrowWhenCertificateNameIsNull()
{
using var builder = TestDistributedApplicationBuilder.Create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void RunAsEmulatorShouldThrowWhenBuilderIsNull()
}

[Fact]
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public void RunAsPreviewEmulatorShouldThrowWhenBuilderIsNull()
{
IResourceBuilder<AzureCosmosDBResource> builder = null!;
Expand Down Expand Up @@ -371,7 +371,7 @@ public void AddContainerShouldThrowWhenPartitionKeyPathIsNullOrEmpty(bool isNull
}

[Fact]
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
[Experimental("ASPIRECOSMOSDB001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
public void WithDataExplorerShouldThrowWhenBuilderIsNull()
{
IResourceBuilder<AzureCosmosDBEmulatorResource> builder = null!;
Expand Down
Loading