跳转到内容

Compiler Error ASPIRECOMPUTE001

此内容尚不支持你的语言。

Version introduced: 9.3

Compute related types and members are for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

The following code generates ASPIRECOMPUTE001:

C# — AppHost.cs
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDockerComposeEnvironment("env");
// or
builder.AddAzureContainerAppEnvironment("env")
// or
builder.AddKubernetesEnvironment("env")

Suppress the error with either of the following methods:

  • Set the severity of the rule in the .editorconfig file.

    .editorconfig
    [*.{cs,vb}]
    dotnet_diagnostic.ASPIRECOMPUTE001.severity = none

    For more information about editor config files, see Configuration files for code analysis rules.

  • Add the following PropertyGroup to your project file:

    C# project file
    <PropertyGroup>
    <NoWarn>$(NoWarn);ASPIRECOMPUTE001</NoWarn>
    </PropertyGroup>
  • Suppress in code with the #pragma warning disable ASPIRECOMPUTE001 directive.

问 & 答协作社区讨论观看