diff --git a/VsTools.Projects/ItemGroupContent.cs b/VsTools.Projects/ItemGroupContent.cs index 4fe0493..6e3491e 100644 --- a/VsTools.Projects/ItemGroupContent.cs +++ b/VsTools.Projects/ItemGroupContent.cs @@ -2,12 +2,16 @@ namespace VsTools.Projects { - public abstract class ItemGroupContent : CsProjectNode + public class ItemGroupContent : CsProjectNode { public override int Depth => 2; private string _include; + public override string ElementName { + get { return ((XElement) Node).Name.LocalName; } + } + public string Include { get { return _include; } diff --git a/VsTools.Projects/Reflection.cs b/VsTools.Projects/Reflection.cs index 0fd39bd..c891129 100644 --- a/VsTools.Projects/Reflection.cs +++ b/VsTools.Projects/Reflection.cs @@ -15,7 +15,12 @@ static Reflection() public static Type GetItemGroupContentTypeFromName(string name) { - return _typelookup[name]; + Type type; + if (_typelookup.TryGetValue(name, out type)) + { + return typeof(ItemGroupContent); + } + return type; } } } \ No newline at end of file