Copied to clipboard

Flag this post as spam?

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


  • Mikael Axel Kleinwort 154 posts 499 karma points c-trib
    May 12, 2023 @ 12:52
    Mikael Axel Kleinwort
    0

    "@using Umbraco.Core" throws in partial view macro file

    As soon as I include one of the following 2 lines in a partial view macro file:

    @using Umbraco.Core
    @using Umbraco.Core.Services
    

    the macro does not load but throws. This is with Umbraco 11.2.0. Could anyone tell me what might be going on here?

    What I try to do is injecting ILocalizationService into the macro with

    @inject ILocalizationService LocalizationService
    

    Kind regards, Mikael

  • Brian Milinski 42 posts 165 karma points
    May 12, 2023 @ 18:50
    Brian Milinski
    100

    I believe it is:@using Umbraco.Cms.Core

  • Mikael Axel Kleinwort 154 posts 499 karma points c-trib
    May 13, 2023 @ 05:17
    Mikael Axel Kleinwort
    1

    Thank you. I tried this before, but spelled it wrongly (CMS uppercase).

Please Sign in or register to post replies

Write your reply to:

Draft