PackageList<InstalledPackage> pkgList = new PackageList<InstalledPackage>();\r
if (Directory.Exists(NaGet.Env.ArchiveProgramFiles)) {\r
foreach (string path in NaGet.Utils.ExtendWildcardFile(NaGet.Env.ArchiveProgramFiles, Path.Combine("*", ".applistation.package.xml"))) {\r
- pkgList.AddPackage(NaGet.Utils.GetDeserializedObject<InstalledPackage>(path));\r
+ try {\r
+ pkgList.AddPackage(NaGet.Utils.GetDeserializedObject<InstalledPackage>(path));\r
+ } catch (Exception) {\r
+ }\r
}\r
this.installedPkgList = pkgList;\r
}\r
{\r
object retVal = null;\r
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read)) {\r
- retVal = sr.Deserialize(fs);\r
+ using (System.Xml.XmlReader xreader = System.Xml.XmlReader.Create(fs)) {\r
+ retVal = sr.Deserialize(xreader);\r
+ }\r
}\r
return retVal;\r
}\r