Copied to clipboard

Flag this post as spam?

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


  • Brian Andersen 35 posts 66 karma points
    Apr 18, 2011 @ 23:45
    Brian Andersen
    0

    umbraco.presentation.nodeFactory

    Error    1   The type or namespace name 'presentation' does not exist in the namespace 'umbraco' (are you missing an assembly reference?)
    
    I am using .Net 2.0 on some old umbraco site, and I can not use nodeFactory. Therefore I can not seem to reference a node from my usercontrol in C#.   Any alternative to getting node properties before nodeFactory in .Net 2.0? 

    Regards
    Brian

  • Brian Andersen 35 posts 66 karma points
    Apr 19, 2011 @ 01:17
    Brian Andersen
    0

    Running umbraco v 4.0.2.1 (Assembly version: 1.0.3560.29210)

    I would like to access to nodes in c# codebehind. Any help is appreciated. I can't find any working examples of how to do this. Should nodeFactory be accessible? Am I doing something else wrong? 

    Thanks
    Brian

  • Lennart Stoop 304 posts 841 karma points
    Apr 19, 2011 @ 01:25
    Lennart Stoop
    0

    Hi Brian,

    Did you add references to the cms.dll, businesslogic.dll and umbraco.dll to your project?

  • Brian Andersen 35 posts 66 karma points
    Apr 19, 2011 @ 01:28
    Brian Andersen
    0

    Hi Lennart

    Yes i did.

     

  • Brian Andersen 35 posts 66 karma points
    Apr 19, 2011 @ 01:38
    Brian Andersen
    0

    Hmm now i got it. Pressed the play button instead of build in visual studio. I did not know that that could do a big difference, but I guess I still have a lot to learn. Anyway now the reference work and i can use nodeFactory. Great! :)

  • Lennart Stoop 304 posts 841 karma points
    Apr 19, 2011 @ 01:39
    Lennart Stoop
    0

    That's odd, nodeFactory should be accessible in that version.

    Can you verify that all these dll files are available in the bin folder?

    If they are, you might be facing a namespace collision: are there any double references? (its may also be worthwile checking the web.config)

  • Lennart Stoop 304 posts 841 karma points
    Apr 19, 2011 @ 01:40
    Lennart Stoop
    0

    Alright, glad you got it up and running :-)

  • Brian Andersen 35 posts 66 karma points
    Apr 19, 2011 @ 01:41
    Brian Andersen
    0

    Thanks for the effort Lennart, I hope I can repay you some day. :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies