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?
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.