Open Unreal Editor via Epic Game Launcher (Not using a self made version from git).
Create a new “C++ Basic Code” project.
Go under File → Add Code to Project and create a new class inherited from Character.
The Editor then creates the class, compiles project, and open the files in VS. No problem with that.
Problem is that new classe’s files are NOT shown in the solution explorer.
Detailed description of the issue :
It seems i can use them anyway, and i still can open them from the Editor, or include the header file in other files like the gamemode, but still…
I tried to locate the files and they are where they should be (Source/[ProjectName]/).
Weirder : Now that i have added my custom class, if i try to close VS, it asks me if i want to save the changes i made in my project. And if i say yes, it asks me where i want to save a vcxproj file (Default is Intermediate/ProjectFiles/[ProjectName].vcxproj) and show no vcxproj file already existing in the said folder.
Yet, if i don’t change the name or directory made by default and want to save, it tells me that there is already a file with that name and asks me if i want to overwrite…
Trying to overwrite the file results in a very helpful “One or more errors occured” message.
Trying to save the file with another name results in the following message : “The method or property “VCProjectShim::put_ProjectFile” is deprecated and no longer implemented.”
Hey, which version of VS are you using? (eg, VS2013 Pro).
We now try and use DTE to inject newly added source files straight into the open VS instance (to avoid the annoying modal popup about having to re-load the project/solution).
It’s possible that this is failing somehow, but it should fallback to the project generation method if that happens.
I’m going to take a look into the saving issue, as I’ve noticed that myself. It might just be a case of us saving the solution after we’ve inserted the new files.
I’ve tried this myself using VS2013 Pro, and VS2013 Ultimate, however I’ve not had any issues with the newly added classes appearing in the solution explorer.
Yes i have admin rights. VS and UE4 are using my account (checked via the task manager).
Turns out that Visual Assist was the problem -_-
After uninstalling it, i created a new project and everything went fine. Solution explorer was updated with my new classes, and even the “vcxproject file” problem didn’t occur.
Just to be sure, i installed it again, tried the same steps as above, and both issues came back.
I’ve just tried this with the latest VAX build, however it’s still working as expected for me.
When this happens to you, do you get any warnings in the UE4 Output Log? (Window → Developer Tools → Output Log).
If you have the source code available, you could take a look in VisualStudioSourceCodeAccessor.cpp. It’s the FVisualStudioSourceCodeAccessor::AddSourceFiles function which adds the new files to the project, and the CurProjectItems->AddFromFile call that actually tries to add the new file via DTE. Is that running okay when adding the new files?