Not sure what was causing it but restarting Unity fixed the problem. Was seeing the following when going into edit → Preferences
TypeLoadException: Could not load type ‘System.CLSCompliantAttribute’ from assembly ‘mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.
System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType)
System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit)
System.MonoCustomAttrs.GetCustomAttribute (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit)
System.Attribute.GetCustomAttribute (System.Reflection.MemberInfo element, System.Type attributeType, Boolean inherit)
System.Attribute.GetCustomAttribute (System.Reflection.MemberInfo element, System.Type attributeType)
UnityEditor.PreferencesWindow.AddCustomSections () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/PreferencesWindow/PreferencesWindow.cs:171)
UnityEditor.PreferencesWindow.OnGUI () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/PreferencesWindow/PreferencesWindow.cs:188)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/GUI/DockArea.cs:228)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/GUI/DockArea.cs:221)
UnityEditor.HostView.OnGUI () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/GUI/DockArea.cs:121)