Compiler Error ASPIRECOMPUTE001
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Version introduced: 9.3
C# — AppHost.cs
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.
Example
Section titled “Example”The following code generates ASPIRECOMPUTE001:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDockerComposeEnvironment("env");// orbuilder.AddAzureContainerAppEnvironment("env")// orbuilder.AddKubernetesEnvironment("env")To correct this error
Section titled “To correct this error”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 = 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);ASPIRECOMPUTE001</NoWarn></PropertyGroup> -
Suppress in code with the
#pragma warning disable ASPIRECOMPUTE001directive.