diff --git a/src/NvGet/Extensions/XmlDocumentExtensions.cs b/src/NvGet/Extensions/XmlDocumentExtensions.cs index fd0f6f9..6ca9f3b 100644 --- a/src/NvGet/Extensions/XmlDocumentExtensions.cs +++ b/src/NvGet/Extensions/XmlDocumentExtensions.cs @@ -204,7 +204,14 @@ public static async Task LoadDocument(this string path, Cancellatio PreserveWhitespace = true, }; - document.Load(path); + try + { + document.Load(path); + } + catch(Exception e) + { + throw new Exception($"Failed to parse file {path}", e); + } #endif return document;