AddTo prevent the build error, you can add the following to a property group in your .csproj:
<InterceptorsNamespaces>$(InterceptorsNamespaces);Microsoft.AspNetCore.OpenApi.Generated</InterceptorsNamespaces>
That's whatSource: I got the same error message directsas you to do and it fixedfollowed the issue for meinstructions, which resolved the problem