umbraco.NodeFactory.Node does not contain a definition for Where
I've upgraded a 4.7 site to 4.11.9 and it's broke some of my scripts.
The below comes back with a "umbraco.NodeFactory.Node does not contain a definition for Where" error, in a class file using the code below (I've removed all the misc lines).
using System; using System.Web; using WebMatrix.Data; using umbraco.NodeFactory; using umbraco.BusinessLogic; using umbraco.cms.businesslogic.web; using umbraco; using umbraco.MacroEngines; using uComponents.Core.uQueryExtensions;
var rootNode = uQuery.GetRootNode(); var searchString = "Homepage"; var foundNodes = rootNode.GetDescendantNodes().Where(x => x.NodeTypeAlias == searchString).First();
umbraco.NodeFactory.Node does not contain a definition for Where
I've upgraded a 4.7 site to 4.11.9 and it's broke some of my scripts.
The below comes back with a "umbraco.NodeFactory.Node does not contain a definition for Where" error, in a class file using the code below (I've removed all the misc lines).
I think you are just missing a
line at the top. Where is an extension methods from that namespace, so you'd need that for it to use it.
Hope that helps
Andy
is working on a reply...