pamidur / aspect-injector

AOP framework for .NET (c#, vb, etc)
Apache License 2.0
745 stars 112 forks source link

error AI_ERR0: Processing failure: System.NotImplementedException: GenericInst #124

Closed ozgursari closed 4 years ago

ozgursari commented 4 years ago

Hi, We have a problem with AspectInjector 2.3.1 in out .NetCore web application. We used AspectInjector in our project for two months, and then we uninstall AspectInjector nuget package and delete codes using AspectInjector. When we revert commit, AspectInjector added again but giving error while compiling project.

8>AspectInjector|2.3.1: Found 1 aspects, 209 injections 8>AspectInjector|2.3.1 : error AI_ERR0: Processing failure: System.NotImplementedException: GenericInst 8> at Mono.Cecil.SignatureReader.ReadPrimitiveValue(ElementType type) 8> at Mono.Cecil.MetadataReader.ReadLocalConstant(UInt32 rid) 8> at Mono.Cecil.MetadataReader.ReadLocalScope(Row6 record) 8> at Mono.Cecil.MetadataReader.ReadScope(MethodDefinition method) 8> at Mono.Cecil.Cil.PortablePdbReader.Read(MethodDefinition method) 8> at Mono.Cecil.ImmediateModuleReader.ReadMethodsSymbols(TypeDefinition type, ISymbolReader symbol_reader) 8> at Mono.Cecil.ImmediateModuleReader.ReadTypesSymbols(Collection1 types, ISymbolReader symbol_reader) 8> at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable1 stream, WriterParameters parameters) 8> at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable1 stream, WriterParameters parameters) 8> at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters) 8> at FluentIL.PatcherBase.WriteAssembly(AssemblyDefinition assembly, String path, Boolean writeSymbols, Boolean verbose) 8> at FluentIL.PatcherBase.Process(String assemblyFile, IAssemblyResolver resolver, Boolean optimize, Boolean verbose) 8> at AspectInjector.Compiler.Execute(String filename, IReadOnlyList`1 references, Boolean optimize, Boolean verbose). Please submit an issue to https://github.com/pamidur/aspect-injector 8>AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors.

AspectInjectorErrorDetail.txt

pamidur commented 4 years ago

Hi @ozgursari , thanks for the report. It looks like a bug with either AspectInjector or Cecil. Two questions:

  1. What was the version you used before? If you rollback to that version does this issue exists?
  2. Is there any chance you can share a parts of the code related to aspect you implemented and code where actual injection happens (injection targets). The issue is somewhere related to generics
pamidur commented 4 years ago

I couldn't reproduce the issue. If you a have chance to share more details or sample project - please reopens this issue!