Compiler Warning ASPIREDOTNETTOOL
Version introduced: 13.2
C# — AppHost.cs
.NET tool resource types and members are for evaluation purposes only and are subject to change or removal in future updates. Suppress this diagnostic to proceed.
This diagnostic warning is reported when using experimental .NET tool resource APIs in Aspire, including:
DotnetToolResourceDotnetToolAnnotationAddDotnetToolextension methods
Example
Section titled “Example”The following code generates ASPIREDOTNETTOOL:
var builder = DistributedApplication.CreateBuilder(args);
var tool = builder.AddDotnetTool("my-tool", "dotnet-tool-package");To correct this warning
Section titled “To correct this warning”Suppress the warning with either of the following methods:
-
Set the severity of the rule in the .editorconfig file.
.editorconfig [*.{cs,vb}]dotnet_diagnostic.ASPIREDOTNETTOOL.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);ASPIREDOTNETTOOL</NoWarn></PropertyGroup>
See also
Section titled “See also”- Executables - Learn about executable resources