Comments (27)
@real-zony , @dartasen, @Alex-Dobrynin ,
Unfortunatelly I don't have arm based mac machine to test it , so I have to rely on you.
Could you please confirm that 2.8.1 works fine on arm machine ?
from aspect-injector.
from aspect-injector.
please let me know if 2.8.3-pre1 fixes it for you!
from aspect-injector.
the same
from aspect-injector.
I got the same error on windows
This is build log
2> AspectInjector|2.8.2: Found 0 aspects, 6 injections
2>AspectInjector|2.8.2 : error AI_ERR0: Processing failure: System.ArgumentException: Arg_ArgumentException
2> at Mono.Cecil.Pdb.ISymUnmanagedWriter2.OpenScope(Int32 startOffset, Int32& pRetVal)
2> at Mono.Cecil.Pdb.NativePdbWriter.DefineScope(ScopeDebugInformation scope, MethodDebugInformation info, MetadataToken& import_parent)
2> at Mono.Cecil.Pdb.NativePdbWriter.DefineScope(ScopeDebugInformation scope, MethodDebugInformation info, MetadataToken& import_parent)
2> at Mono.Cecil.Pdb.NativePdbWriter.Write(MethodDebugInformation info)
2> at Mono.Cecil.Cil.CodeWriter.WriteResolvedMethodBody(MethodDefinition method)
2> at Mono.Cecil.Cil.CodeWriter.WriteMethodBody(MethodDefinition method)
2> at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
2> at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
2> at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
2> at Mono.Cecil.MetadataBuilder.AddTypes()
2> at Mono.Cecil.MetadataBuilder.BuildTypes()
2> at Mono.Cecil.MetadataBuilder.BuildModule()
2> at Mono.Cecil.MetadataBuilder.BuildMetadata()
2> at Mono.Cecil.ModuleWriter.<>c.b__2_0(MetadataBuilder builder, MetadataReader _)
2> at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func3 read) 2> at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata) 2> at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable
1 stream, WriterParameters parameters)
2> at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable1 stream, WriterParameters parameters) 2> at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters) 2> at Mono.Cecil.ModuleDefinition.Write(WriterParameters parameters) 2> at Mono.Cecil.AssemblyDefinition.Write(WriterParameters parameters) 2> at FluentIL.PatcherBase.WriteAssembly(AssemblyDefinition assembly, Boolean writeSymbols, Boolean verbose) 2> at FluentIL.PatcherBase.Process(String assemblyFile, IAssemblyResolver resolver, Boolean optimize, Boolean verbose) 2> at FluentIL.PatcherBase.Process(String assemblyFile, IReadOnlyList
1 references, Boolean optimize, Boolean verbose)
2> at AspectInjector.Compiler.Execute(String filename, IReadOnlyList`1 references, Boolean optimize, Boolean verbose). Please submit an issue to https://github.com/pamidur/aspect-injector
2>AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors.
from aspect-injector.
The macOS 13.4 also had the same issue. The version of AspectInjector is 2.8.2. It works normally in the Docker container of X64. My MacBook is M2 Max and uses the ARM version of dotnet (6.0.413).
from aspect-injector.
My temporary solution is to use Docker (x86) debugging in Rider (through Rosetta 2), but this makes the debugging very slow each time. Is there any update on this issue? Thank you.
I tried version 2.8.3-pre1 but it still did not solve my issue.😔
from aspect-injector.
from aspect-injector.
Could you please use 2.8.1 while I'm fixing this? Just to double check, 2.8.2 does not work for x86 and arm and 2.8.1 does not work only for arm Correct?
…
On Wed, 23 Aug 2023, 03:02 Zony, @.> wrote: My temporary solution is to use Docker (x86) debugging in Rider (through Rosetta 2), but this makes the debugging very slow each time. Is there any update on this issue? Thank you. — Reply to this email directly, view it on GitHub <#220 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7HZUBT43MBTDOWQKARI73XWTCW7ANCNFSM6AAAAAA2IAYFTY . You are receiving this because you commented.Message ID: @.>
Of course, I rolled back to version 2.8.1, and it is working correctly.
from aspect-injector.
Same issue
from aspect-injector.
Yes, 2.8.1 it works on mac m1
from aspect-injector.
Hey guys, could you please try 2.8.3-pre2 ?
from aspect-injector.
Hey guys, could you please try 2.8.3-pre2 ?
from aspect-injector.
do you use Rosetta ?
from aspect-injector.
when your method return is not void
,you should only use Kind.Around
[Advice(Kind.Around, Targets = Target.Method)]
public object OnEnter([Argument(Source.Name)] string name,
[Argument(Source.Arguments)] object[] args,
[Argument(Source.Type)] Type hostType,
[Argument(Source.Target)] Func<object[], object> target,
[Argument(Source.Triggers)] System.Attribute[] triggers)
{
var mutex = new Mutex(false, Name);
mutex.WaitOne();
var result = target(args);
mutex.ReleaseMutex();
return result;
}
from aspect-injector.
but while user use MVC , such error followed wont be shown.
AI_EA00 Advice 'OnEnter' must return 'object' for 'Around' advice Test.Aspect-Injector.Failed D:\backup\0.Main\workspace\resources\Test.Aspect-Injector.Failed\Test.Aspect-Injector.Failed\Test.Aspect-Injector.Failed\MutexHandlerAttribute.cs 43 活动
thats unexpected.
from aspect-injector.
you can refer to demo for a success running.
from aspect-injector.
amazing , i move exactly same code into other project , same error occurred.
windows11/vs2022 17.4.4.
AI_FAIL Aspect Injector processing has failed. See other errors. ProjectCommon
..\Common\AspectInjector 1
from aspect-injector.
i think i found where problem is,see docs
from aspect-injector.
I'm experiencing the same issue. I'm on Apple Silicon, my coworker with Mac on Intel doesn't have this problem.
Here is the detailed log:
2>Target "_ASI_InjectAspectsCore" in file "/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre2/buildTransitive/netstandard2.0/AspectInjector.targets" from project "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/Dodo.Loyalty.ComponentTests.csproj" (target "InjectAspects" depends on it):
Set Property: _ProcessCmd="/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre2/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll._asi_refs" "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll"
Task "Message" skipped, due to false condition; ( '$(AspectInjector_Debug)' == 'true' ) was evaluated as ( 'false' == 'true' ).
Using "Exec" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Exec"
Task Parameter:Command="/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre2/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll._asi_refs" "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll"
Task Parameter:EchoOff=True
Task Parameter:IgnoreExitCode=True
Task Parameter:WorkingDirectory=/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre2/buildTransitive/netstandard2.0/
/var/folders/y5/bg13rk8164n771x2jq7892ph0000gn/T/MSBuildTempstilettk/tmpaa7b21c171eb4634b4ae0d25bde46562.exec.cmd: line 2: 29017 Killed: 9 "/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre2/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll._asi_refs" "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll"
Output Property: _AspectExitCode=137
Done executing task "Exec".
Using "Error" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Error"
Task Parameter:File=AspectInjector
Task Parameter:Text=Aspect Injector processing has failed. See other errors.
Task Parameter:Code=AI_FAIL
2>AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors. [/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/Dodo.Loyalty.ComponentTests.csproj]
Done executing task "Error" -- FAILED.
2>Done building target "_ASI_InjectAspectsCore" in project "Dodo.Loyalty.ComponentTests.csproj" -- FAILED.
from aspect-injector.
I'm really sorry my Mac users, since I don't have it is hard to figure out what actually goes wrong.
@stilettk do you have Rosetta installed?
from aspect-injector.
@stilettk do you have Rosetta installed?
I didn't explicitly install it, but according to this, I have it installed.
from aspect-injector.
@pamidur FYI in 2.8.3-pre3 the problem persists
Build log
2>Target "_ASI_InjectAspectsCore" in file "/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre3/buildTransitive/netstandard2.0/AspectInjector.targets" from project "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/Dodo.Loyalty.ComponentTests.csproj" (target "InjectAspects" depends on it):
Set Property: _ProcessCmd="/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre3/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll._asi_refs" "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll"
Task "Message" skipped, due to false condition; ( '$(AspectInjector_Debug)' == 'true' ) was evaluated as ( 'false' == 'true' ).
Using "Exec" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Exec"
Task Parameter:WorkingDirectory=/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre3/buildTransitive/netstandard2.0/
Task Parameter:Command="/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre3/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll._asi_refs" "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll"
Task Parameter:IgnoreExitCode=True
Task Parameter:EchoOff=True
/var/folders/y5/bg13rk8164n771x2jq7892ph0000gn/T/MSBuildTempstilettk/tmp3c20c11a47674faaaeb388be23585be7.exec.cmd: line 2: 35405 Killed: 9 "/Users/stilettk/.nuget/packages/aspectinjector/2.8.3-pre3/buildTransitive/netstandard2.0/../../build/_bin/osx-arm64/AspectInjector" -rf "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll._asi_refs" "/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/obj/Debug/net7.0/Dodo.Loyalty.ComponentTests.dll"
Output Property: _AspectExitCode=137
Done executing task "Exec".
Using "Error" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Error"
Task Parameter:File=AspectInjector
Task Parameter:Code=AI_FAIL
Task Parameter:Text=Aspect Injector processing has failed. See other errors.
2>AspectInjector : error AI_FAIL: Aspect Injector processing has failed. See other errors. [/Users/stilettk/RiderProjects/loyalty/tests/Dodo.Loyalty.ComponentTests/Dodo.Loyalty.ComponentTests.csproj]
Done executing task "Error" -- FAILED.
2>Done building target "_ASI_InjectAspectsCore" in project "Dodo.Loyalty.ComponentTests.csproj" -- FAILED.
from aspect-injector.
can you try https://www.nuget.org/packages/AspectInjector/2.8.3-pre3#supportedframeworks-body-tab ? and see if it helps
if it still does not work, you can try adding
<PropertyGroup>
<AspectInjector_UseRosetta>true</AspectInjector_UseRosetta>
</PropertyGroup>
to your csproj
from aspect-injector.
What do you mean by trying https://www.nuget.org/packages/AspectInjector/2.8.3-pre3#supportedframeworks-body-tab? To use net20
or netstandard2.0
? Unfortunately, I can't do this in my project because all references require newer versions.
AspectInjector_UseRosetta
helped though. But I hope that this won't be a requirement because AspectInjector is a transitive dependency for us (from Allure.NUnit).
from aspect-injector.
it is there just to test it. It seems like Rosetta is going to be a requirement and after the next release it is going to be the only supported option. I just can't make it run on apple silicon without rosetta without having actual mac :(
from aspect-injector.
Hey People! Install the terminal with Rosetta settings and this error will be gone after dotnet build
command.
from aspect-injector.
Related Issues (20)
- Aspect Injector processing has failed (v2.8.0), Mono.Cecil.Cil.SymbolsNotFoundException HOT 9
- Multiple Same Validator Aspect On MethodFeature Can Not Wroking HOT 2
- System.NotSupportedException Mac M1 Mono HOT 3
- Feature: Provide debug symbols with NuGet package HOT 2
- Feature: Replace object[0] to Array.Empty<object> HOT 1
- Feature: Can cache Argument(Source.*) any input argument by static field? HOT 1
- Lack of M1 support when rosetta isn't installed HOT 14
- Unsupported language/version ? HOT 1
- Feature: Why `GetInstance` method for Factory should be static? HOT 3
- Local variables in sync methods are not visible in the VS debugger HOT 13
- Feature: Attribute Multicasting HOT 1
- In a Advice method with Kind.Before and Target.Constructor, accessing mixed-in properties injected into a class containing an explicit constructor causes NullReferenceError. HOT 4
- Feature: Make `[assembly: Attribute]` work with virtual methods that don't have an override HOT 2
- Feature: Clean Cache
- error AI_ERR0: Processing failure: System.ObjectDisposedException: Cannot access a closed file.
- Failed to resolve assembly: 'mscorlib, Version=4.0.0.0
- AspectInjector|2.8.1 : error AI_ERR0: Processing failure: System.NotSupportedException: Arg_NotSupportedException
- Feature: Extend Universal attributes to support async aspects HOT 6
- System.InvalidOperationException: Aspect doesn't have global singleton injected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspect-injector.