I’m using VS2010 and this is the second time I have found myself trying to resolve this error. I had to the project and solution configured targeting platform x86 and targeting framework .Net 3.5.
In my most example I was trying the ‘OnServerValidate’ event of an asp:CustomValidator control wired up I received this error message:
CS1061: ‘_____’ does not contain a definition for and no extension method accepting a first argument of type ‘_____’ could be found (are you missing a using directive or an assembly reference?)
The issue was fixed by changing the solution and project to target ‘Any CPU’. Once it wired up I could change the platform targeting back to x86 and everything work.
NOTE: After the issue was fixed I could not replicate it again within the same project.