When i create an instance of AutoSuspendHelper:
var suspension = new AutoSuspendHelper(ApplicationLifetime);
i got previewer crash (coz ApplicationLifetimeis null in design time )
11:54:15.676 [Error] 13528 <= "Unhandled Exception: System.ArgumentNullException: Value cannot be null."
11:54:15.713 [Error] 13528 <= "Parameter name: ApplicationLifetime is null. Ensure you are initializing AutoSuspendHelper when Avalonia application initialization is completed."
Application lifetime is not guaranteed to be configured since it's platform/application dependent. No lifetime is configured for previewer platform since there there is no application running.
Started working on a fix for this. Adding a Design.IsDesignMode check should be enough hopefully.