Not working when use with DispathProxy

When I call I method inside a class implementation of DispatchProxy (AOP), It’s not working.
This is message inside Dashboard:

System.IO.FileNotFoundException
Could not resolve assembly ‘ProxyBuilder’.

System.IO.FileNotFoundException: Could not resolve assembly ‘ProxyBuilder’.
at System.TypeNameParser.ResolveAssembly(String asmName, Func2 assemblyResolver, Boolean throwOnError, StackCrawlMark& stackMark) at System.TypeNameParser.ConstructType(Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark) at System.TypeNameParser.GetType(String typeName, Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Func2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
at Hangfire.Common.TypeHelper.DefaultTypeResolver(String typeName)
at Hangfire.Storage.InvocationData.DeserializeJob()

Help me please, thank you!

Just specify the path explicitly, e.g.:

BackgroundJob.Enqueue<IMyInterface>(x => x.MyJob());

Instead of

BackgroundJob.Enqueue(() => myProxy.MyJob());

Proxies are generated at run-time and can’t be properly serialized and deserialized back.

1 Like

I used proxy to loging file before and after method called.
So, If I use like your suggest.
My method not auto log file