I have a very odd problem. The source for my current game compiles fine in Unity3D and runs. When I double-click on a script Unity3D (5.4.1) will generate my SLN file and open it in Visual Studio 2015.
When I try to compile in Visual Studio I get loads of errors
Error CS0234 The type or namespace name ‘LoggingFacade’ does not exist in the namespace ‘MyCompanyName’ (are you missing an assembly reference?)
Here is the really odd thing. If I double-click an error to open the offending CS file the error disappears without me having to alter the source code at all. So I can in fact build my game in Visual Studio if I first open every CS file in the editor. If I don’t then I get these errors.
Can anyone help?