Adding Scripts to Unity Doesn't Correctly Update Visual Studio Solution Or Project
When I have a Unity project and I add a C# file the open it the file rarely (i.e. less that half of the time) correctly integrates into the existing Visual Studio solution project (editor projects as well).
Is anyone else struggling with this issue?
Is there a better solution than simply deleting the Visual Studio solution and project files, forcing Unity to recreate them?
VS2017 Unity5.6*f
Thanks,
Answer by MaxGuernseyIII · Nov 28, 2017 at 07:10 PM
This is one of many, many duplicates on the same subject. There are a bunch of things to try but I just sidestep the issue by not letting Unity do any of my compiling. Create a real solution, make all the relevant assemblies have the right build target (one of the Unity ones), set the output folder for the assemblies to be somewhere under your assets directory, then enjoy all the benefits of Visual Studio and Unity without drawbacks of the tenuous integration.
I didn't see any of the duplicates, sorry.
I did see quite a few about a different problem that is the exact opposite (i.e. Unity not updating from changes in Visual Studio) but none the other way round.
Unfortunately, you do let Unity do your compiling any time you bring your cs files into Unity. If you saying you only build out dll's for use in Unity that's a different story but not one that is applicable to much of the development in the editor.
But I still wish to have an answer on this particular topic if any know the cause....