Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Patrik 37 posts 89 karma points
    May 19, 2014 @ 16:44
    Patrik
    0

    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!

  • Patrik 37 posts 89 karma points
    May 20, 2014 @ 08:22
    Patrik
    2

    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.

Please Sign in or register to post replies

Write your reply to:

Draft