diff --git a/src/SharedAssemblyInfo.cs b/src/SharedAssemblyInfo.cs index 4e6bdc8..897fd58 100644 --- a/src/SharedAssemblyInfo.cs +++ b/src/SharedAssemblyInfo.cs @@ -4,7 +4,7 @@ [assembly: AssemblyProduct("Unicorn")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.1.4.0")] -[assembly: AssemblyFileVersion("4.1.4.0")] -[assembly: AssemblyInformationalVersion("4.1.4")] +[assembly: AssemblyVersion("4.1.5.0")] +[assembly: AssemblyFileVersion("4.1.5.0")] +[assembly: AssemblyInformationalVersion("4.1.5-pre1")] [assembly: CLSCompliant(false)] diff --git a/src/Unicorn/Configuration/PredicatePreset.cs b/src/Unicorn/Configuration/PredicatePreset.cs index c9a0882..0de96c0 100644 --- a/src/Unicorn/Configuration/PredicatePreset.cs +++ b/src/Unicorn/Configuration/PredicatePreset.cs @@ -68,7 +68,7 @@ protected virtual XmlElement ReplaceValues(Dictionary replacers, // ReSharper disable once PossibleNullReferenceException foreach (XmlNode att in clone.Attributes) { - while (att.Value.Contains("$")) + if (att.Value.Contains("$")) { didReplacement = true; @@ -76,6 +76,11 @@ protected virtual XmlElement ReplaceValues(Dictionary replacers, { att.Value = Regex.Replace(att.Value, "\\$" + replacerKey, replacers[replacerKey], RegexOptions.IgnoreCase); } + + if (att.Value.Contains("$")) + { + throw new InvalidOperationException($"Predicate Preset '{((XmlElement)includeElement.ParentNode).Attributes["id"].Value}' could not be expanded, there are unresolved token attributes '{att.Value}'"); + } } }