Skip to content
Docs Try Aspire
Docs Try

AspireValueAttribute

Class sealed net8.0
📦 Aspire.Hosting v13.3.0
Marks an immutable static field or property as an ATS-exported value.
namespace Aspire.Hosting;
public sealed class AspireValueAttribute
: System.Attribute
{
// ...
}
Attribute

Exported values are snapped during ATS scanning and emitted into generated guest SDKs as predefined values. They are intended for immutable DTO, enum, and primitive values that should be available without re-declaring them in each guest language.

The catalogName becomes the root name of the generated value catalog in guest SDKs. Nested static types are emitted as nested namespaces or classes under that root.

Exported values should be side-effect free and should not return handles or other runtime-bound ATS types.