private static void OnMainWindowLaunch(MainWindow mainWindow) { _version = typeof(Program).Assembly.GetCustomAttribute <AssemblyFileVersionAttribute>().Version; App.Logger.Log($"FrostySoundImport by DanDev - Version {_version}"); // hack because Frosty calls GetEntryAssembly() which returns null normally var domainManager2 = new AppDomainManager(); domainManager2.SetFieldValue("m_entryAssembly", Application.ResourceAssembly); AppDomain.CurrentDomain.SetFieldValue("_domainManager", domainManager2); _tabControl = mainWindow.GetFieldValue <FrostyTabControl>("tabControl"); _tabControl.SelectionChanged += TabControlOnSelectionChanged; }