Symptoms
- When trying to enter play mode, I am receiving the error below:
error CS1061: Type `__' does not contain a definition for `__' and no
extension method `__' of type `__' could be found (are you missing
a using directive or an assembly reference?)
Cause
The CS1061 error is caused when you try to call a method or access a class member that does not exist.
The example below shows the method SayGoodbye being called through Class1. As we can see Class1 does not contain a definition for the method SayGoodbye.
Errors displayed in this example:
error CS1061: Type `Class1' does not contain a definition for
`SayGoodbye' and no extension method `SayGoodbye' of type
`Class1' could be found (are you missing a using directive
or an assembly reference?)
Resolution
To fix the CS1061 error you will need to ensure that the method or class member does exist and is being accessed from the correct location.
More Information
https://msdn.microsoft.com/en-us/library/bb383961.aspx