ASPIREPIPELINES004
Ce contenu n’est pas encore disponible dans votre langue.
Type is for evaluation purposes only and is subject to change or removal in future updates
This diagnostic warns when using the experimental IPipelineOutputService interface and the PipelineOutputService implementation. These APIs are part of the Aspire pipeline infrastructure for managing output and temporary directories during deployment operations.
Example generating diagnostic
Section titled “Example generating diagnostic”var builder = DistributedApplication.CreateBuilder(args);
// Using IPipelineOutputServicevar outputService = builder.Services.BuildServiceProvider().GetRequiredService<IPipelineOutputService>();var outputDir = outputService.GetOutputDirectory();var tempDir = outputService.GetTempDirectory();The diagnostic is triggered because IPipelineOutputService is marked with the [Experimental("ASPIREPIPELINES004")] attribute.
Understanding the diagnostic
Section titled “Understanding the diagnostic”The IPipelineOutputService interface provides directory management functionality for Aspire deployment pipelines:
- Output directories: Manages the location where deployment artifacts are written
- Temporary directories: Provides isolated temporary storage for build operations
- Resource-specific paths: Creates subdirectories for individual resources
This API is experimental because the pipeline infrastructure is under active development, and the directory management strategy may evolve based on deployment scenario requirements.
Related types
Section titled “Related types”IPipelineOutputService: Service for managing pipeline output and temporary directoriesPipelineOutputService: Default implementation managing configured and default pathsGetOutputDirectory(): Gets the base output directory for deployment artifactsGetOutputDirectory(IResource): Gets a resource-specific output subdirectoryGetTempDirectory(): Gets the base temporary directory for build artifactsGetTempDirectory(IResource): Gets a resource-specific temporary subdirectory
Suppressing the diagnostic
Section titled “Suppressing the diagnostic”The diagnostic can be suppressed using one of several methods:
Suppressing in .editorconfig
Section titled “Suppressing in .editorconfig”[*.cs]dotnet_diagnostic.ASPIREPIPELINES004.severity = noneSuppressing in a project file
Section titled “Suppressing in a project file”<PropertyGroup> <NoWarn>$(NoWarn);ASPIREPIPELINES004</NoWarn></PropertyGroup>Suppressing in source code
Section titled “Suppressing in source code”#pragma warning disable ASPIREPIPELINES004var outputService = builder.Services.BuildServiceProvider().GetRequiredService<IPipelineOutputService>();var outputDir = outputService.GetOutputDirectory();#pragma warning restore ASPIREPIPELINES004