This behavior is in a vb.net web application solution with multiple class library projects referenced by the web app.
The code compiles, but in debug mode, some func
Try to CleanSolution, it appeared to fix it for me.
CleanSolution