public void EnsurePackageInfoIsLoadedAsync() { if (this._isLoaded || this._isLoading) { return; } this._isLoading = true; new Task((Action)(() => { try { IEnumerable <Package> packages = InstallationManager.FindPackages(); List <string> stringList = new List <string>(); foreach (Package package in packages) { string str = package.Id.ProductId.Replace("{", "").Replace("}", ""); stringList.Add(str.ToUpperInvariant()); } this._isLoaded = true; this._isLoading = false; this._installedPackageIds = stringList; } catch (Exception ex) { ServiceLocator.Resolve <IAppStateInfo>().ReportException(ex); } })).Start(); }