Copied to clipboard

Flag this post as spam?

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


  • Ben Weeks 14 posts 35 karma points
    Sep 01, 2015 @ 13:15
    Ben Weeks
    0

    DLL Reference for Umbraco.Web.UmbracoApplication?

    Hi all,

    I am creating a new Visual Studio class project that sites alongside my Umbraco CMS web project (Umbraco v7). I have added a new Global class (similar to this method, but in my own class project: https://gist.github.com/jkarsrud/5143239):

    public class Global: Umbraco.Web.UmbracoApplication

    However, it is unable to find Umbraco.Web.UmbracoApplication. I have checked the object explorer in the web project (e.g. umbraco, businesslogic, Umbraco.Core, etc.) however, none of these seem to contain Umbraco.Web.UmbracoApplication. What reference am I missing? I am assuming it would be an overkill to include the whole CMS nuget package for just a class library project.

    Many thanks.

    Ben

  • Jerode 44 posts 159 karma points
    Sep 01, 2015 @ 14:42
    Jerode
    0

    UmbracoApplication is in the umbraco.dll (Namespace Umbraco.Web) which inherits Umbraco.Core.dll (Namespace Umbraco.Core)

    using Umbraco.Web should be what you need.

    As for the references, If I recall correctly there are some assemblies like businesslogic and cms that are used by the compiler so they are needed.

  • Ben Weeks 14 posts 35 karma points
    Sep 01, 2015 @ 16:04
    Ben Weeks
    1

    Thank you Jerode. I actually did the following:

    • Removed my class library project, and added an empty MVC4 application and removed all but the Controllers folder (so I could easily add
      Controllers to it).
    • Added the Umbraco Core nuget package
    • Renamed my namespace from MyCompany.Umbraco.Logic to MyCompany.UmbracoWebsite.Logic as it thought I was trying to
      reference MyCompany.Umbraco.Web.UmbracoApplication.

    Many thanks.

    Ben

  • Jerode 44 posts 159 karma points
    Sep 01, 2015 @ 16:48
    Jerode
    0

    Nice job. Good luck.

Please Sign in or register to post replies

Write your reply to:

Draft