Copied to clipboard

Flag this post as spam?

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


  • praveen 113 posts 164 karma points
    Jul 21, 2011 @ 04:07
    praveen
    0

    UMBRACO.DLL 1.0.4085.20549 issue

    HI I have installed umbraco 4.7

    from the install pacakage I have taken the umbraco.dll 1.0.4090.38017 and referenced it in visual studio 2010 project,  I then wrote the follwiing code to loop through the Parent and its child nodes:

             Node CurNode = Node.GetCurrent();
             Nodes ChNodes = CurNode.Children;

             string text = null;

                foreach (Node doc in ChNodes)
                {
                    if (doc.Children.Count > 1)
                    {
                        text += doc.Name + "--";
                       
                    }
                }
                Label1.Text = text;

    when I compile the project in VS2010 I get the following error:

    Error 1 The type 'umbraco.interfaces.INode' is defined in an assembly that is not referenced. You must add a reference to assembly 'interfaces, Version=1.0.4085.20549, Culture=neutral, PublicKeyToken=null'. C:\Software Development\trunk\UserControls\DocumentList.ascx.cs 57 13 

    How do I get rid of this error

    Basically I want to read the document properties in csharp code and write it to format to diplay

    you help is greatly appreciated

    Kind Regards

    Praveen

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jul 21, 2011 @ 04:28
    Tom Fulton
    0

    Hi Praveen,

    You should also add a reference interfaces.dll from the install binaries the same way you referenced umbraco.dll in order to use INode.

    Hope this helps,
    Tom

  • praveen 113 posts 164 karma points
    Jul 21, 2011 @ 04:33
    praveen
    0

    Hi Tom

    Thanks for your help, that worked like a charm :)

    can you please help me with this one if you are able pleaseeeeeeeee

    http://our.umbraco.org/forum/developers/api-questions/22416-CSharp-Code-to-loop-through-nodes

    Again many thanks for your help

    Kind Regards

    Praveen

Please Sign in or register to post replies

Write your reply to:

Draft