I’m using my own Extension Methods throughout several of my projects. When I compile(Build/Rebuild) all is fine. However when I start the debugger and the code recompiles, I get a list of errors all associated with the extension methods stating that they aren’t a member of the class they are attached to. Any thoughts on why this might be happening? It seems intermittent as I can recompile and clean and recompile several times and it finally will allow me to launch the debugger.
I’m using my own Extension Methods throughout several of my projects. When I compile(Build/Rebuild)
Share
Possibly the PDB’s are not being generated properly? Are you launching from VS or attaching to a process? If attaching, make sure the PDB’s are in the same location as the application.
Try:
Project Properties -> Build -> Advanced
Set ‘Debug Info’ = Full
Also, what namespace do you have the extension methods in? Make sure they are in the ROOT namespace or just remove the namespace all together (just for now as a test).
What kind of types are you extended? Is it possible you have two types of the same name and you’re trying to extend the wrong one?