The analyzers and build targets of the Stunts package report problems at the call that asks for
the stunt, at build time.
| Id | Severity | Title | What to do |
|---|---|---|---|
ST001 |
Error | Base type must be first | Put the class first in the type arguments, as in a C# type declaration. |
ST002 |
Error | Multiple base types specified | Pass at most one class; the other type arguments are interfaces. |
ST003 |
Error | Invalid sealed base type | A sealed class can't be derived from. Use an interface it implements. |
ST004 |
Error | Invalid enum base type | Enums can't be proxied. |
ST005 |
Types using pointer parameters are not supported | No longer reported: pointer signatures are supported, see ST009. |
|
ST006 |
Error | Invalid base type | The class needs a public or protected constructor. |
ST007 |
Error | Invalid generator attribute | The configured generator attribute isn't in the compilation. |
ST008 |
Error | Containing type is not partial | A private or protected nested type is proxied from inside its containing type: make that type partial. |
ST009 |
Error | Ref structs and pointers require compile-time stunts | Enable compile-time stunts and AllowUnsafeBlocks. |
ST010 |
Error | Delegate type combined with other types | A delegate stunt has the delegate as its only type argument. |
ST011 |
Warning | Compile-time stunts are disabled or not supported | Install Stunts.DynamicProxy for run-time stunts. Always the case for Visual Basic. |
ST012 |
Error | Interface member is inaccessible | An abstract interface member (an internal setter of another assembly, for example) can't be implemented here. |
ST013 |
Error | Unsupported CLR signature | TypedReference, ArgIterator and RuntimeArgumentHandle can't go through the pipeline, and neither can a ref struct or pointer returned by reference (ref Span<int>): return it by value. |
ST014 |
Warning | Native AOT requires compile-time stunts | Set EnableCompileTimeStunts to true. See Native AOT. |
ST015 |
Warning | Stunt member requires dynamic code | See the alternatives in Native AOT. |
ST016 |
Error | Generic stunt wrapper must be a generator method | Mark the wrapper [StuntGenerator] (code fix available). See Custom factories. |
ST017 |
Error | Stunt types cannot use type parameters of a containing type | Make them type parameters of a [StuntGenerator] method. |
ST018 |
Error | Generic stunt wrapper cannot be virtual | Make the wrapper non-virtual, and not an interface member. |
ST019 |
Error | Generic stunt wrapper cannot be closed | Remove recursion with different type arguments, or chains deeper than 8 wrappers. |
ST020 |
Error | Compile-time stunts require C# 9 or later | Set LangVersion to 9 or later, or use Stunts.DynamicProxy. |
ST021 |
Error | Stunts cannot be nested in generic types | Make the nested type internal or public. |
ST022 |
Error | Syntax-only processor reads untracked inputs | For custom generator processors marked [SyntaxOnlyProcessor]: stop reading semantic inputs, or remove the attribute. |
ST023 |
Error | Ref structs require .NET 9 and C# 13 | Target .NET 9 or later, set LangVersion to 13 or later, or both: the message says which. |
ST024 |
Error | Stunts.CompiledProxy generator not found | The Stunts package's tools/5.0/Stunts.CompiledProxy.dll is missing. Restore packages, or install Stunts.DynamicProxy for run-time stunts. |
ST025 |
Error | Interface has static abstract members | static abstract interface members cannot be implemented through an instance behavior pipeline. Proxy a non-static-abstract interface instead. |
ST026 |
Error | File-local type cannot be proxied | Types declared with the file modifier are inaccessible from generated source files. Make the type internal or public. |
ST027 |
Error | Stunt generation failed | Generating a single stunt threw an unexpected error while other stunts continued generating. Inspect the message and report a bug with the target type declaration. |
An invalid stunt doesn't stop the others from being generated: fix the reported calls, and the rest of the project already has its stunts.