Prevent visual studio from opening after creating class in the editor


I’ve been looking for a way to prevent visual studio from opening whenever I create a new code file in the unreal editor. I haven’t seen anything in the project setting of the editor that seems to allow this. It’s possible I’m looking in the wrong area.

Basically I use desktops 2.0 which allows me to have 4 desktops running and I have visual studio on a different desktop than the unreal editor. There aren’t any issues doing this, when I flip to the visual studio desktop it prompts me to reload my solution and everything works fine. It’s just tedious that the editor opens a new instance of visual studio every time I create a new code file.

Hello ,

Unless I’m mistaken, Visual Studio needs to be opened when the Class Wizard is used for creating a new C++ class as the editor immediately attempts to generate the project files and then compile the project to include the new class. I would suggest leaving Visual Studio open in the background as it should not open a new instance, but just compile using the one that is already running. I’m not familiar with using Desktop 2.0 myself but the only other option I could suggest would be finding a way to get the editor to link up to the instance of Visual Studio that is on this other desktop, if that is even possible.

Thanks for the info. I think I probably just found an edge case where the editor can’t find the instance of visual studio running because it’s technically running under another instance of explorer.exe.

Perhaps this is a candidate for something I can contribute to the engine.

Thanks again for the info :slight_smile:

Is there a way to tell the editor not to open a new instance of Visual Studio (or CLion in my case as I’m on Mac and using that IDE)?

I’m not sure about CLion as we don’t directly support that IDE, but Visual Studio shouldn’t open another instance if you already have the project open in Visual Studio. Instead, Visual Studio should take focus and show you the newly added class.