I created a new C++ project on Unreal Engine 4. After that I close visual studio and ue4 editor. I manually added public and private folders in the source folder. Then I made folders for the player, items, AI and gamemodes.
The problem appears when I create a new class, the files appear in the respective folders but not in the editor. To fix this I open the visual studio project and I press the build solution. I restart the editor and the classes appear in the folder structure.
The real problem starts here. When i double click any class. A new visual studio appears, ue4 shows the progress bar on the bottom right corner with the text "Loading visual studio". After a couple of seconds a new visual studio pops up. A new screen appears saying that the project is opened on another visual studio and now will migrate all info to a temp folder.
Now I can't code because any attempt at using a C++ class by dragging it into the editor viewport instantly crashes UE4.
What am I doing wrong? What is the correct workflow for creating folder structures in UE4? There is no documentation on how to do this properly.