Skip to content

The package breaks any interceptor used with <InterceptorsNamespaces> #29

Description

@Atulin

Description

Including any other interceptors with <InterceptorsNamespaces> results in them not actually being included, at all

Reproduction Steps

  1. Add this package
  2. Add another interceptor with <InterceptorsNamespaces>
  3. Build

Expected behavior

Builds

Actual behavior

Does not build

Regression?

No response

Known Workarounds

Use <InterceptorsPreviewNamespaces> in your project instead

Configuration

No response

Other information

Just needs one change to https://github.com/stbychkov/AutoLoggerMessage/blob/main/src/AutoLoggerMessageGenerator/AutoLoggerMessageGenerator.targets#L4

<Project InitialTargets="stbychkov_AutoLoggerMessage_Interceptors">
  <Target Name="stbychkov_AutoLoggerMessage_Interceptors">
    <PropertyGroup>
-     <InterceptorsNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Logging.AutoLoggerMessage</InterceptorsNamespaces>
+     <InterceptorsNamespaces>$(InterceptorsNamespaces);Microsoft.Extensions.Logging.AutoLoggerMessage</InterceptorsNamespaces>
      <InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Logging.AutoLoggerMessage</InterceptorsPreviewNamespaces>
    </PropertyGroup>
  </Target>
</Project>

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions