Skip to content

Add an analyzer that triggers a build warning or error if IInvocation.Proceed() is called in an async method #749

Open

Description

@drauch

Calling IInvocation.Proceed in an async method is almost always wrong, right? If you are in an async method you are obliged to call IInvocation.CaptureProceedInfo and then call proceedInfo.Invoke instead. An analyzer would have helped us a lot and had spared us lots of debugging time.

Best regards,
D.R.

Activity

  1. stakx commented on Jul 21, 2026

    @stakx
    Member

    Code analyzers steering users in the right direction would of course be nice to have. Until then, I'll refer you to our documentation about async interception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions