Couldn't find module rules file

Hello,
I am currently trying to setup a dedicated server, but am unable to build my project in Visual Studio because of the following error:

Couldn’t find module rules file for module ‘MyProject’ (“MyProject” being my project name).

I already added a MyProjectServer.Build.cs and MyProjectServer.Target.cs and replaced all instances of “MyGame” with my project name, according to this tutorial, but I’m not at all sure if my Build.cs is even remotely correct.
Additionally, I noticed that my project has “externally referenced”-errors on the main level of my project, just mentioning this in case there is a relation between these issues.

May there be any other reason for this problem? Are there other good resources to fix this?

Thank you.

According to your question, you may have create an additional Build.cs, instead of a Target.cs as requested by the tutorial.

Also, make sure you Regenerate Project Files afterwards.

MyProjectServer.Build.cs to MyProjectServer.Target.cs might be what you’re looking for, as TargetRules go into Target.cs files, not Build.cs files.

Sorry, I expressed myself incorrectly, fixed it now in the original question. I added a Build.cs and a Target.cs.

However, you were still right. Removing the Build.cs fixed the problem. I’m not quite sure why I added it in the first place.