Copied to clipboard

Flag this post as spam?

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


  • Hans van de Peppel 8 posts 73 karma points
    Nov 15, 2021 @ 01:20
    Hans van de Peppel
    0

    PublishedContentExtensions exists in both Umbraco.Core & Umbraco.Web.Common

    Hi,

    The code: using PublishedContentExtensions = Umbraco.Extensions.PublishedContentExtensions;

    Give the following error: Severity Code Description Project File Line Suppression State Error CS0433 The type 'PublishedContentExtensions' exists in both 'Umbraco.Core, Version=9.0.1.0, Culture=neutral, PublicKeyToken=null' and 'Umbraco.Web.Common, Version=9.0.1.0, Culture=neutral, PublicKeyToken=null'

    <em>*</em>* enter image description here

    In my previous project [umbraco 8.17.0] this was working correclty. I was wondering how to solve this.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Nov 16, 2021 @ 09:07
    Sebastiaan Janssen
    0

    I think using Umbraco.Extensions; should do the trick for you.

  • Hans van de Peppel 8 posts 73 karma points
    Dec 01, 2021 @ 02:43
    Hans van de Peppel
    0

    The problem not solved with that trick.

    I created another example maybe this give enough direction to sort out the problem.

    enter image description here Also I noticed the FriendlyPublishedContentExtensions not have this issue.

    When I look in the files Umbraco.Core.xml and Umbraco.Web.Common.xml (located at ..\user.nuget\packages) I see the following:

    Umbraco.Core.xml

    enter image description here

    Umbraco.Web.Common.xml

    enter image description here

    I'm not sure this is correct and how to solve this.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Dec 01, 2021 @ 09:40
    Sebastiaan Janssen
    0

    But what are you really trying to do? What is your end goal? Which extension method do you wish to use and how are you trying to use it?

    What does your code look like in v8?

Please Sign in or register to post replies

Write your reply to:

Draft