Target file not added even though regenerating project files

Hello!

I’ve used the template to compile a standalone dedicated server to my game. I added the .cs file next to the rest of my target files in my project and regenerated the project files. But when I open the project in VS the file is not there.
I located the directory to the file in the <Game>ProjectFileGeneratorModuleRulesSourceFiles.txt file so I guess the file somehow exists but I still don’t know why I doesn’t show up.
Before I started with unreal I’ve used CMake together with another game engine and I haven’t had this problem before so I have no idea what to do. Any ideas?

Best Regards
Doz