'Add' and no extension method 'Add' accepting a first argument of type 'example.Data.ExamStage.Staff'
Monday, July 30, 2012 11:45 AM
I am new to .NET, C# when I run my ETL with C# code project, getting the following error:
'example.Data.ExamStage.Staff' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'example.Data.ExamStage.Staff' could be found (are you missing a using directive or an assembly reference?) C:\example\ContactInfo\ContactInfoDataLoader.cs
Please do the needful.
Thanks in advance,
- Moved by Rob Va - MSFTMicrosoft Employee Tuesday, August 28, 2012 6:34 PM (From:FAST Products (pre-2010))
Tuesday, August 28, 2012 6:32 PM
As this forum is for Fast specific issues, I will be moving this to a forum dealing with .NET/C# questions.
Rob Vazzana | Sr Support Escalation Engineer | US Customer Service & Support
Customer Service & Support Microsoft| Services
Wednesday, August 29, 2012 7:36 AM
Welcome to the MSDN Forum.
Based on my understanding, it seems that you need to redesign your class "example.Data.ExamStage.Staff", add one more method "Add".
Call me ghost for short, Thanks
To get the better answer, it should be a better question.
Monday, September 03, 2012 2:58 AMShow us the code for 'Add' and how u r calling it.
Please mark this post as answer if it solved your problem. Happy Programming!
Tuesday, September 11, 2012 12:48 PM
Error is that C# compiler can not resolve method or extension method Add that takes example.Data.ExamStage.Staff as an parameter so you are probably missing one, are not referencing required assembly or have not resolved the correct namespace.
If you are using newest Visual Studio then by hovering over the Add that is not found, click context menu open and look for Resolve. This should resolve problem if you are just missing the using statement of the namespace. If there is no resolve option, then error is somewhere else.
Other option is that you need to add reference to assembly that contains class that has correct Add method you can look under the References section if there is any invalid reference, usually those are reference that can not be resolved what might occur if for example you have copied project or moved the referenced assembly.
Last option is that you need to implement the correct method, but surely you should know if that's the case.
- Edited by MasaSamMicrosoft Community Contributor Tuesday, September 11, 2012 12:49 PM