Compiler Error ASPIREPIPELINES005
Konten ini belum tersedia dalam bahasa Anda.
Pipeline output diffing APIs are for evaluation purposes only and are subject to change or removal in future updates. Suppress this diagnostic to proceed.
Aspire 17.0 introduced output diffing, which regenerates pipeline output from the current AppHost and fails when the selected files differ from the files that were already on disk. The output diffing APIs are experimental and might change in future releases. The C# compiler reports ASPIREPIPELINES005 when your AppHost uses them.
For more information, see Detect drift in generated pipeline output.
APIs affected
Section titled “APIs affected”This diagnostic applies to the following output diffing APIs:
WithOutputDiffingextension methods onIDistributedApplicationBuilder, including the generic overloadsPipelineOutputDiffOptions,PipelineOutputDiffRule, andPipelineOutputDiffMode, which configure the default comparisonIPipelineOutputSnapshotter<TSnapshot>andIPipelineOutputComparer<TSnapshot>, which customize capture and comparisonPipelineOutputChangeandPipelineOutputChangeKind, which describe reported changes
Example
Section titled “Example”The following code generates ASPIREPIPELINES005:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDockerComposeEnvironment("compose");
// Using WithOutputDiffing generates ASPIREPIPELINES005builder.WithOutputDiffing();
builder.Build().Run();TypeScript AppHosts don’t report this diagnostic. The generated TypeScript SDK marks withOutputDiffing with the @experimental tag.
To correct this error
Section titled “To correct this error”Suppress the error with one of the following methods:
-
Set the severity of the rule in the .editorconfig file.
.editorconfig [*.{cs,vb}]dotnet_diagnostic.ASPIREPIPELINES005.severity = noneFor more information about editor config files, see Configuration files for code analysis rules.
-
Add the following
PropertyGroupto your project file:C# project file <PropertyGroup><NoWarn>$(NoWarn);ASPIREPIPELINES005</NoWarn></PropertyGroup> -
Add the following property directive to a file-based AppHost:
AppHost.cs #:property NoWarn=ASPIREPIPELINES005 -
Suppress in code with the
#pragma warning disable ASPIREPIPELINES005directive:Suppressing the error #pragma warning disable ASPIREPIPELINES005builder.WithOutputDiffing();#pragma warning restore ASPIREPIPELINES005