Compiler Warning ASPIREEXTENSION001
Extension debugging support APIs 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 extension debugging support APIs in Aspire, including:
WithDebugSupport<T, TLaunchConfiguration>extension methodSupportsDebuggingAnnotationDebugSupportExtensions.SupportsDebuggingandDebugSupportExtensions.CreateLaunchConfigurationAsyncExecutableLaunchConfiguration,ProjectLaunchConfiguration,ExecutableLaunchMode, andKnownLaunchConfigurationTypesWithLaunchToolArgsextension method
These APIs are primarily used by integration authors to enable F5 debugging for custom resource types in Visual Studio and other IDEs.
WithLaunchToolArgs declares the tool-invocation prefix for the tool that hosts a program (for example run ./cmd/api for go launcher/CLI, or -m flask for python CLI), separating it from program-specific arguments a caller adds with WithArgs. This allows extensions and IDEs to vary host tool arguments as necessary to reach the desired execution mode of the program (e.g. running under debugger vs not, enabling or disabling profiling etc.) without affecting startup arguments the program sees itself.
Example
Section titled “Example”The following code generates ASPIREEXTENSION001:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddMyResource("resource") .WithDebugSupport( processId => new MyLaunchConfiguration { ProcessId = processId }, "myResourceType");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.ASPIREEXTENSION001.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);ASPIREEXTENSION001</NoWarn></PropertyGroup>
See also
Section titled “See also”- Custom hosting integrations - Learn about creating custom integrations