Skip to content

Encountering "error AI_FAIL: Aspect Injector processing has failed. See other errors." with latest Logging .NET nuget package #237

@AdithyaAthreya

Description

@AdithyaAthreya

Environment (please complete the following information):

  • OS: Windows
  • Framework: net8.0
  • Type of application: AWS lambda project
  • Version of AspectInjector: 2.8.1, 2.8.2
  • Logging library version: 1.6.0, 1.6.1

Describe the bug
The Logging nuget is throwing the below exception at compile time when a .net 8.0 lambda project is being compiled.

AspectInjector|2.8.1: Found 0 aspects, 14 injections
3>AspectInjector|2.8.1 : error AI_ERR0: Processing failure: System.InvalidOperationException: Expected sequence is not found even once. Unsupported language/version ?
3> at FluentIL.MethodEditor.OnEveryOccasionOf(MethodBody body, Func2 predicate, PointCut pc, Instruction startingFrom) 3> at FluentIL.MethodEditor.OnCall(MethodBody body, MethodReference method, PointCut pc, Instruction startingFrom) 3> at AspectInjector.Core.Advice.Weavers.Processes.AfterAsyncWeaveProcess.FindOrCreateAfterStateMachineMethod() 3> at AspectInjector.Core.Advice.Weavers.Processes.AfterStateMachineWeaveProcessBase.Execute() 3> at AspectInjector.Core.Advice.Weavers.AdviceStateMachineWeaver.WeaveMethod(MethodDefinition method, InjectionDefinition injection) 3> at AspectInjector.Core.Advice.Weavers.AdviceInlineWeaver.Weave(InjectionDefinition injection) 3> at AspectInjector.Core.Processor.PatchAssembly(AssemblyDefinition assembly, Boolean optimize, Boolean verbose) 3> at FluentIL.PatcherBase.Process(String assemblyFile, IAssemblyResolver resolver, Boolean optimize, Boolean verbose) 3> at FluentIL.PatcherBase.Process(String assemblyFile, IReadOnlyList1 references, Boolean optimize, Boolean verbose)
3> at AspectInjector.Compiler.Execute(String filename, IReadOnlyList`1 references, Boolean optimize, Boolean verbose). Please submit an issue to https://github.com/pamidur/aspect-injector
3>AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors.

To Reproduce
A steps to reproduce the bug. Or a description when it happens (in compile-time, in runtime).

Additional context
I upgraded the AspectInjector nuget to 2.8.2 but it did not resolve the issue. Only upon downgrading the Logging nuget to 1.5.1 did the issue go away and I was able to get a successful build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions