Editor not opening project

Hi,

I have a project that the editor refuses to open. It manages to reach the launch window and after clicking to open the project a dialogue box opens up that says:

Hold On…
Compiling scripts

Then this box closes and nothing happens.

It doesn’t happen on any other projects. The unity version is 5.5.2f1 64 bit. Before this error there were errors in the console saying that the reference Unity.Purchases could not be found. Checking the solution in VS however the namespace is in the solution so I’m not sure what is causing this bug.

EDIT: From the Editor log:
TypeLoadException: Could not load type ‘UnityEditor.Settings’ from assembly ‘UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’.
at UnityEditor.WindowLayout…cctor () [0x00000] in C:\buildslave\unity\build\Editor\Mono\GUI\WindowLayout.cs:15
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for UnityEditor.WindowLayout

If anyone can shed any light on this problem it would be much appreciated.

Replying with the fix to this problem.
Initially upgraded to 5.6 which allowed the editor to open but the services were not connecting and had disappeared in the editor toolbar under “Window”.

Appears from other recent threads that this is a known bug in Unity 5.x that I assume hasn’t yet been fixed.

Logging out of Unity account and logging back in allowed me to access services through the editor. I then had to switch off Ads and IAP and switch them back on again before the project would compile again correctly.

I’m getting this error in 2017.3.1, related to using the experimental .NET 4.x support. The editor crashes, and then when i try to reload i get this error and unity wont load anymore for that project.
The work around is to delete the /Library/ScriptAssemblies folder and reload.