Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 937 posts 2572 karma points
    May 22, 2023 @ 13:00
    Claushingebjerg
    0

    Umbraco.Community.BlockPreview build error

    Im trying to install Rick Butterfield's Umbraco.Community.BlockPreview 1.2.1 on 10.5.1

    Install goes fine, but when i add add AddBlockPreview() to the Startup.cs file, before AddWebsite(), as stated in the docs, i get the follwing error on build.

    error CS1061: 'IUmbracoBuilder' does not contain a definition for 'AddBlockPreview' and no accessible extension method 'AddBlockPreview' accepting a first argument of type 'IUmbracoBuilder' could be found (are you missing a using directive or an assembly reference?)
    

    Any Clues?

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    May 22, 2023 @ 14:01
    Frans de Jong
    0

    It seems like you are missing a using in your startup file. What happens if you add using Umbraco.Community.BlockPreview.BlockPreviewUmbracoBuilderExtensions

    to the startup?

  • Claushingebjerg 937 posts 2572 karma points
    May 23, 2023 @ 06:49
    Claushingebjerg
    100

    You should add this to the satrt of your startup.cs just after namespace

    namespace BlockProject
    {
        using Umbraco.Community.BlockPreview;
    
Please Sign in or register to post replies

Write your reply to:

Draft