autofac / Autofac.Extras.DynamicProxy

Interceptor and decorator support for Autofac IoC via Castle DynamicProxy
MIT License
106 stars 33 forks source link

Autofac.Extensions.DependencyInjection 6.0 version cannot be used aop #33

Closed anjoy8 closed 4 years ago

anjoy8 commented 4 years ago

hello, If it's 5.0, there's no problem, But if I upgrade to Autofac.Extensions.DependencyInjection 6.0,

<ItemGroup>
PackageReference Include" "Autofac.Extensions.DependencyInjection""Version" "6.0.0" /
PackageReference Include" "Autofac.Extras.DynamicsProxy" Version" "4.5.0" /
</ItemGroup>

will be reported error:

An unhandled antalysed dysd while processing the request.
ProxyGenerationException: This is a DynamicSProxy2 error: Target type for the proxy implements Castle.Dynamics.IProxyAccessorTarget is a Dynamics infrastructure interface and you want never it. Are Are you trying to proxy an exist proxying?

There's a question here: Unable to hook up interceptor on classes/interfaces in asp.net core 3.1 application

tillig commented 4 years ago

DynamicProxy hasn't been updated for 5.0 yet.

anjoy8 commented 4 years ago

OKay,thx