This is a migrated thread and some comments may be shown as answers.

System.ArgumentException: Cannot bind to the target method ...

1 Answer 164 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 06 Mar 2013, 11:10 AM
Hello,
I am getting this error when running an application that loads my class library which presents a reportviewer in a windows form

"System.ArgumentException: Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type."

My class library is built using Visual Studio 2010 and C#, targetting .Net Framework 4 and Platform is set to AnyCPU. I have tried with both Q3 2012 and Q1 2013 versions of Telerik Reporting but I get the same error.

I have also installed on the same machine Visual Studio 2012 and the .Net Framework version seems to be 4.5 (System.DLL version is 4.0.30319.18034).

Can you suggest how I may overcome this please?
Thanks
Craig

1 Answer, 1 is accepted

Sort by
0
Craig
Top achievements
Rank 1
answered on 06 Mar 2013, 02:22 PM
The error was nothing to do with Reporting. It was due to the signature of the method being called causing .Net to do strange things and sending me down a rabbit hole looking for a reason for the message.

 
Tags
General Discussions
Asked by
Craig
Top achievements
Rank 1
Answers by
Craig
Top achievements
Rank 1
Share this question
or