Copied to clipboard

Flag this post as spam?

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


  • Ivan 139 posts 302 karma points
    Oct 04, 2011 @ 13:47
    Ivan
    0

    DateFolders NET 3.5 version?

    Hi.

    I am trying to make DateFolders work on Umbraco 4.5.2 NET 3.5.
    Trying to recompile DateFolders class i get the following error:

    The type or namespace name 'NodeFactory' does not exist in the namespace 'umbraco' (are you missing an assembly reference?)

    I have added references to cms.dll, businesslogic.dll, umbraco.dll and interfaces.dll but can't build it successfully.

    Any help? Is it possible to get this package working under NET 3.5?

    Thanks in advance!!!
    Ivan

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Oct 04, 2011 @ 14:00
    Stefan Kip
    1

    You should rename all references/using statements from umbraco.NodeFactory to umbraco.presentation.nodeFactory

  • Ivan 139 posts 302 karma points
    Oct 04, 2011 @ 14:08
    Ivan
    0

    Thanks kipusoep but now i get context errors with ConfigurationManager and HttpContext.
    Any idea?

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Oct 04, 2011 @ 14:09
    Stefan Kip
    0

    What is/are the exact message(s)?

  • Ivan 139 posts 302 karma points
    Oct 04, 2011 @ 14:12
    Ivan
    0

    Using umbraco.NodeFactory:

    Error    1    The type or namespace name 'NodeFactory' does not exist in the namespace 'umbraco' (are you missing an assembly reference?)    C:\Documents and Settings\buddychrist\Mis documentos\Visual Studio 2010\Projects\InfoCaster.Umbraco.DateFolders\InfoCaster.Umbraco.DateFolders\DateFolders-1.3.cs    39    15    InfoCaster.Umbraco.DateFolders

    Using umbraco.presentation.nodeFactory instead:

                _itemDocType = ConfigurationManager.AppSettings["itemDocType"].Split(',');
                _itemDateProperty = ConfigurationManager.AppSettings["itemDateProperty"];
                _dateFolderDocType = ConfigurationManager.AppSettings["dateFolderDocType"];

    Error    2    The name 'ConfigurationManager' does not exist in the current context    C:\Documents and Settings\buddychrist\Mis documentos\Visual Studio 2010\Projects\InfoCaster.Umbraco.DateFolders\InfoCaster.Umbraco.DateFolders\DateFolders-1.3.cs    59    28    InfoCaster.Umbraco.DateFolders

    Several HttpContext errors:

                        HttpContext.Current.Items.Add("monthId", doc.ParentId);
                        HttpContext.Current.Items.Add("yearId", doc.Parent.ParentId);

    Error    5    The name 'HttpContext' does not exist in the current context    C:\Documents and Settings\buddychrist\Mis documentos\Visual Studio 2010\Projects\InfoCaster.Umbraco.DateFolders\InfoCaster.Umbraco.DateFolders\DateFolders-1.3.cs    78    21    InfoCaster.Umbraco.DateFolders


  • Stefan Kip 1614 posts 4131 karma points c-trib
    Oct 04, 2011 @ 14:15
    Stefan Kip
    1

    You can just click on ConfigurationManager and HttpContext (so the cursor is somewhere inside that term) and press CTRL + . (dot). A context menu will appear and gives you the ability to automatically add a using statement.

    If it doesn't appear or gives other options than described above, you're references are wrong;
    1. You're not referencing the needed .NET assemblies
    2. You're referencing multiple .NET versions thorugh the assemblies 

  • Ivan 139 posts 302 karma points
    Oct 04, 2011 @ 14:19
    Ivan
    0

    Thanks!

    I will give check it carefully and try again starting a new project.

  • Ivan 139 posts 302 karma points
    Oct 04, 2011 @ 14:38
    Ivan
    0

    Using umbraco.presentation.nodeFactory instead of umbraco.NodeFactory and adding references to System.Configuration.dll and System.Web.dll solved it.

    Thanks for your recommendations!
    Ivan

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Oct 04, 2011 @ 14:46
    Stefan Kip
    1

    No problem... Did you seriously mark your own post as the answer while I gave you the answer?

    Looks greedy to me...

  • Ivan 139 posts 302 karma points
    Oct 04, 2011 @ 15:08
    Ivan
    0

    Sorry kipusoep, i didnt mean to be ungrateful. If I mark my final post as the answer was only for including .dll referenced files and describe the complete solution in my case.

    I am really gratefull for your help and quick response and so i give you a High five.

    Best regards,
    Ivan

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Oct 04, 2011 @ 15:12
    Stefan Kip
    0

    Normally you'd mark the one post, which helped you best to solve your problem, as 'the answer'.
    That way people receive karma for helping others, which stimulates the our umbraco ecosystem.

    So please, in the future be gentle and mark answers like you should ;-)

    No problem and good luck! 

Please Sign in or register to post replies

Write your reply to:

Draft