Add Code to Project Regenerates SLN

Hello,

I recently wrote a tool that parses the header files in (Rocket DIR)/Engine/Sources and adds them to a VS Utility project, but I've noticed that whenever i use "Add Code To Project" from inside the editor it regenerates the SLN ( Solution ) file.  Which in turn removes the header project that was generated.  I don't see why it is necessary to regenerate the SLN file when adding a file to a project.  Is there an option i can set that will disable the SLN regeneration or is it hard coded in?

Thank you for your time,
John Melton

It’s pretty much hard coded in. Rocket is designed to have the solution file recreated all the time. Users should not really be hand-maintaining those files. This is just how UE4 works, because when you are dealing with lots of platforms, build configurations and targets all at once, it becomes very difficult for a human to hand-maintain all of the options.

The reason it recreates the solution file is because the editor doesn’t actually understand anything about Visual Studio projects. It simply creates a new source file on disk and runs the project generator, which sees the source file and includes it in the freshly regenerated projects. This might be something we can look at improving – for example, we could make UnrealBuildTool.exe extensible such that it could add your own custom “utility projects” to the newly generated solution file.

–Mike

Having that extensibility would be great. the way i have my tool setup is when it generates the project and project filter file it saves it to (ProjectDir)/Intermediate/ProjectFIles which is where the main project file is stored. Having UnrealBuildTool detect and add that when it regenerates would be useful. But it probably would not high up on the giant todo list for the engine.

Thank you for your time,
John Melton