Skip to content

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

@Atulin

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions