From e150adf7807b32117080d690189fbc1e96866e06 Mon Sep 17 00:00:00 2001 From: Peter Donker Date: Tue, 16 Jan 2018 14:25:58 +0100 Subject: [PATCH] Fixes --- Common.cs | 1 + Connect.AssemblyAnalyzer.csproj | 3 ++- Models/CecilClass.cs | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Common.cs b/Common.cs index 8ef7bf9..6b9981a 100644 --- a/Common.cs +++ b/Common.cs @@ -279,6 +279,7 @@ public static void WriteToDoc(this AssemblyNameReference dependency, ref XmlNode { var depNode = AddElement(ref doc, "dependency"); AddAttribute(ref depNode, "version", dependency.Version.ToString()); + AddAttribute(ref depNode, "versionnorm", dependency.Version.ToVersionString()); depNode.InnerText = dependency.FullName; } #endregion diff --git a/Connect.AssemblyAnalyzer.csproj b/Connect.AssemblyAnalyzer.csproj index fb2a870..35e5437 100644 --- a/Connect.AssemblyAnalyzer.csproj +++ b/Connect.AssemblyAnalyzer.csproj @@ -10,7 +10,8 @@ - D:\Documents\WindowsPowerShell\DNN\ + D:\Documents\WindowsPowerShell\DNN\analyze\ + false true diff --git a/Models/CecilClass.cs b/Models/CecilClass.cs index fccdd73..77b2b64 100644 --- a/Models/CecilClass.cs +++ b/Models/CecilClass.cs @@ -89,7 +89,14 @@ public CecilClass(AssemblyReader assemblyReader, TypeDefinition cClass) pm.CodeBlocks.Add(cb); } } - pm.Decompiled = assemblyReader.Decompiler.DecompileAsString(p).ToDictionary(); + try + { + pm.Decompiled = assemblyReader.Decompiler.DecompileAsString(p).ToDictionary(); + } + catch + { + pm.Decompiled = "".ToDictionary(); + } pm.Declaration = pm.GetDeclaration(); pm = Common.ParseDeprecation(p, pm); Properties.Add(pm);