Adding New Source requires VS Restart

I’ve been having an issue since 4.8 and now on 4.9 as well with Visual Studio 2013 on Windows 8. Every time I add a new source file from unreal editor I get into some odd VS behavior.

First, after the initial compile, the new files don’t show up in the Visual Studio solution. But since part of the UE4 process is to open the new file sources in the editor window, I often make changes to these directly. After saving these files, Visual Studio will tell me that the file has been modified outside the editor. There have been a few times where I’ve written a bit of code, saved, exited VS and came back to a blank header file.

Also what happens is that auto-complete will break, I’ll type UPR and the completion window will pop-up for UPROPERTY, I’ll hit enter or tab and nothing happens. Once this happens I have to close VS, and until I re-generate VS Project Files, the problem will persist.

I also use Visual Assist, so am not really sure at what level things are breaking. Anyone else experience these issues and have a clue how to prevent them?

Well when you add new source through the Unreal Editor, UE regenerates your solution file (the .sln) so when going into VS the very first thing that it should do is toll you files have been changed and you should reload the solution. You shouldn’t need to restart VS, it should just offer to reload the solution for you. If you don’t, then yeah you are going to run into problems.

That makes sense and is definitely not happening right now. I just noticed this UnrealVS plugin that has a quick reload feature, I might give that a try.