You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DynamicProxy apparently doesn't support System.UIntPtr properly. This may become more of an issue now that C# 9 has a dedicated keyword for this type (nuint).
System.NotSupportedException: Specified method is not supported.
at Castle.DynamicProxy.Generators.Emitters.OpCodeUtil.EmitLoadOpCodeForDefaultValueOfType(ILGenerator gen, Type type)
at Castle.DynamicProxy.Generators.Emitters.SimpleAST.DefaultValueExpression.Emit(IMemberEmitter member, ILGenerator gen)
at Castle.DynamicProxy.Generators.Emitters.SimpleAST.ReturnStatement.Emit(IMemberEmitter member, ILGenerator gen)
at Castle.DynamicProxy.Generators.Emitters.CodeBuilders.AbstractCodeBuilder.Generate(IMemberEmitter member, ILGenerator il)
at Castle.DynamicProxy.Generators.Emitters.MethodEmitter.Generate()
at Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.EnsureBuildersAreInAValidState()
at Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType()
at Castle.DynamicProxy.Generators.InterfaceProxyWithoutTargetGenerator.GenerateType(String typeName, Type proxyTargetType, Type[] interfaces, INamingScope namingScope)
at Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.<>c__DisplayClass6_0.<GenerateCode>b__0(String n, INamingScope s)
at Castle.DynamicProxy.Generators.BaseProxyGenerator.<>c__DisplayClass34_0.<ObtainProxyType>b__0(CacheKey _)
at Castle.Core.Internal.SynchronizedDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Castle.DynamicProxy.Generators.BaseProxyGenerator.ObtainProxyType(CacheKey cacheKey, Func`3 factory)
at Castle.DynamicProxy.Generators.InterfaceProxyWithTargetGenerator.GenerateCode(Type proxyTargetType, Type[] interfaces, ProxyGenerationOptions options)
at Castle.DynamicProxy.DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options)
at Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, IInterceptor[] interceptors)
at Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget[TInterface](ProxyGenerationOptions options, IInterceptor[] interceptors)
at ...
I narrowed this down to just UIntPtr, which isn't covered here:
DynamicProxy apparently doesn't support
System.UIntPtr
properly. This may become more of an issue now that C# 9 has a dedicated keyword for this type (nuint
).This short program:
will fail with:
I narrowed this down to just
UIntPtr
, which isn't covered here:Core/src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/DefaultValueExpression.cs
Line 75 in 5f28652
The text was updated successfully, but these errors were encountered: