Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AdithyaAthreya opened this issue Oct 11, 2024 · 0 comments
Labels

Comments

@AdithyaAthreya
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant