I'm using VS2022 and what worked for me was to click the "Show All Files" at the top in the solution explorer:
That will make them visible but they are still not part of the solution. Btw, sometimes I need to reload the solution or Visual Studio to make the button work.
After you see them, right click and select "Include in Project":
Then just click the first button again and you should see only what's in the project:
