Can't add C++ components to Blueprints directly anymore in 4.18

Whenever I have a problem like this (and I’m using loads of custom components so it’s happened a few times) I go through these steps and it usually seems to work:

  1. Close both Unreal project and Visual Studio.
  2. Delete derived folders (Binaries, Intermediate, Saved)
  3. Right click project file and ‘Generate Visual Studio Project files’
  4. Open up Visual Studio project and ‘Rebuild Solution’
  5. Open up Unreal project - it will ask to rebuild DLL on opening

It’s a bit of a ‘have you tried turning it off and back on’ kinda answer, I know, but if the code looks like it should be working and just isn’t, this often makes it work for me.