I just set up a local development environment using umbraco 7.1.3.
When i try to get a node programatically from code behind like this:
using Node = umbraco.NodeFactory.Node;
var settingsNode = Node.GetCurrent();
It gives me this error when trying to build:
Error246The type or namespace name 'NodeFactory' does not exist in the namespace 'umbraco' (are you missing an assembly reference?)C:\inetpub\wwwroot\...715projectx
I've referenced the following dll's in my Visual Studio project: cms.dll interfaces.dll businesslogic.dll umbraco.dll
I'm not getting any errors while writing the code, so it looks like it finds the stuff, but when building it halts.
Okay, i figured it out after a good nights sleeep. Apparently i created the Visual Studio project using .NET 4.0, while the Umbraco dll's was compiled with 4.5. Updating the project to 4.5 solved it.
NodeFactory namespace issue
Hi all,
I just set up a local development environment using umbraco 7.1.3.
When i try to get a node programatically from code behind like this:
using Node = umbraco.NodeFactory.Node;
var settingsNode = Node.GetCurrent();
It gives me this error when trying to build:
Error 246 The type or namespace name 'NodeFactory' does not exist in the namespace 'umbraco' (are you missing an assembly reference?) C:\inetpub\wwwroot\... 7 15 projectx
I've referenced the following dll's in my Visual Studio project:
cms.dll
interfaces.dll
businesslogic.dll
umbraco.dll
I'm not getting any errors while writing the code, so it looks like it finds the stuff, but when building it halts.
Any ideas?
Thanks!
Okay, i figured it out after a good nights sleeep. Apparently i created the Visual Studio project using .NET 4.0, while the Umbraco dll's was compiled with 4.5. Updating the project to 4.5 solved it.
is working on a reply...