"Create Visual Studio Project Files" not working - not adding cpp & h files to solution

Hi,

[edit: I edited the questions with more details]

I want to create a new module

NO MODULE GETS CREATED USING "Create Visual Studio Project Files"

EditorCustomScript.uproject:

{
	"FileVersion": 3,
	"EngineAssociation": "4.25",
	"Category": "",
	"Description": "",
	"Modules": [
		{
			"Name": "MyModules",
			"Type": "Editor",
			"LoadingPhase": "PostEngineInit",
			"AdditionalDependencies": [
				"Engine",
				"CoreUObject"
			]
		}
	]
}

MyModule.Build.cs:

using UnrealBuildTool;
 
public class MyModule : ModuleRules
{
	public MyModule(ReadOnlyTargetRules Target) : base(Target)
	{
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
 
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine","GDBlogPost"});
 
		PublicIncludePaths.AddRange(new string[] {"MyModule/Public"});
 
		PrivateIncludePaths.AddRange(new string[] {"MyModule/Private"});
	}
}

MyModule.h

#pragma once
 
#include "ModuleManager.h"
 
DECLARE_LOG_CATEGORY_EXTERN(MyModule, All, All);
 
class FMyModule : public IModuleInterface
{
	public:

	virtual void StartupModule() override;
 
	virtual void ShutdownModule() override;
};

MyModule.cpp

#include "MyModule.h"
 
DEFINE_LOG_CATEGORY(MyModule);
 
#define LOCTEXT_NAMESPACE "FMyModule"
 
void FMyModule::StartupModule()
{
	UE_LOG(MyModule, Warning, TEXT("MyModule module has started!"));
}
 
void FMyModule::ShutdownModule()
{
	UE_LOG(MyModule, Warning, TEXT("MyModule module has shut down"));
}
 
#undef LOCTEXT_NAMESPACE
 
IMPLEMENT_MODULE(FMyModule,MyModule)

here is visual studio project with nothing in it (appart from UE4 folder wich is Unreal stuffs):

thanks for your help

I still don’t understand what you are saying but I think you want to say that you are unable to see the the .cpp and .h files. You made a new C++ class in the editor and you can’t see it in visual studio. Then you can just simply double click the C++ class and you will be able to see it in Visual Studio. If still not try rebuilding the project. By right clicking on UE4 and select rebuild.

I rewrote the question

FYI : I am a professional programmer, I know VS and this looks like a bug

anyone ???

The module you added should be fine as a secondary module, but game projects expect at least one Game Module and associated Target.cs file. These should be named for your uproject (EditorCustomScript) to ensure the build scripts work as expected.

When you first add c++ to a blueprint-only project, it is strongly recommended that you do so by adding a class via the editor (File → New C++ Class). This will ensure all of the necessary files are generated, with the expected naming pattern. Since it seems like you’re developing in isolation with the intent to port to some other project, you can also have the editor create a new plugin for you (Edit → Plugins → New Plugin).

The most important thing to learn about Unreal C++ is that your existing skills won’t translate when you’re getting started. The build system works the way it does to maximize the ability for users to ship games, and for most users that means using Blueprints and the Editor itself.

thanks, indeed adding a class created all the assets in VS
I want to use C++ in a blueprint project (I am a confirmed C++ programmer btw)