none
Error using dynamics RRS feed

  • Question

  • I'm having an error with my obfuscated assembly when using dynamics.

    The error is

     

    Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.GroupToArgsBinder.LookForCandidates()

       at Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.BindMethodGroupToArgumentsCore(GroupToArgsBinderResult& pResults, BindingFlag bindFlags, EXPRMEMGRP grp, EXPR& args, Int32 carg, Boolean bindingCollectionAdd, Boolean bHasNamedArgumentSpecifiers)

       at Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.BindMethodGroupToArguments(BindingFlag bindFlags, EXPRMEMGRP grp, EXPR args)

       at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCall(ICSharpInvokeOrInvokeMemberBinder payload, EXPR callingObject, ArgumentObject[] arguments, Dictionary`2 dictionary)

       at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.DispatchPayload(DynamicMetaObjectBinder payload, ArgumentObject[] arguments, Dictionary`2 dictionary)

       at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)

       at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)

       at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable`1 args, IEnumerable`1 arginfos, DynamicMetaObject onBindingError)

       at Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder.FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)

       at System.Dynamic.DynamicMetaObject.BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args)

       at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel)

       at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)

       at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)

     

    The code where the error is being raised is a simple code.

    dynamic obj = reloadedObj;
    
    ....
    obj.AddRelations<EntityRelation>(reloadedRelations, addObjectRelationsInput.OperationAttributes);
    

    When I access the AddRelations method I get the error shown above.


    João Brandão Senior Engineer
    Monday, January 2, 2012 3:06 PM

Answers

  • Sorry for my late reply.

    After some testing it only happens on a computer. So I think that something is wrong with that computer.


    João Brandão Principal Engineer
    • Marked as answer by Paul Zhou Tuesday, February 7, 2012 4:43 AM
    Friday, February 3, 2012 5:56 PM

All replies

  • Hi,

    Welcome to the MSDN forum.

    Could you please tell us the error message? You just show us where occurs this error, but no error message.

    Moreover, would you mind providing a code snippet that helps us to reproduce this issue?

    What's the type of "reloadedObj'? And what's the method "AddRelations"? Which Framework you are using? Are you using Entity Framework?

    Any more information that helps us to reproduce this issue is appreciated.

    Thanks.


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, January 4, 2012 6:30 AM
  • Sorry for my late reply.

    After some testing it only happens on a computer. So I think that something is wrong with that computer.


    João Brandão Principal Engineer
    • Marked as answer by Paul Zhou Tuesday, February 7, 2012 4:43 AM
    Friday, February 3, 2012 5:56 PM