diff --git a/src/umbraco.businesslogic/ApplicationTree.cs b/src/umbraco.businesslogic/ApplicationTree.cs index d5a4ff4ffa..67faf9b7ec 100644 --- a/src/umbraco.businesslogic/ApplicationTree.cs +++ b/src/umbraco.businesslogic/ApplicationTree.cs @@ -260,6 +260,10 @@ namespace umbraco.BusinessLogic LoadXml(doc => { + var el = doc.Root.Elements("add").SingleOrDefault(x => x.Attribute("alias").Value == alias && x.Attribute("application").Value == applicationAlias); + + if (el == null) + { doc.Root.Add(new XElement("add", new XAttribute("silent", silent), new XAttribute("initialize", initialize), @@ -272,6 +276,7 @@ namespace umbraco.BusinessLogic new XAttribute("assembly", assemblyName), new XAttribute("type", type), new XAttribute("action", string.IsNullOrEmpty(action) ? "" : action))); + } }, true); }