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'
In my previous project [umbraco 8.17.0] this was working correclty. I was wondering how to solve this.
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'
In my previous project [umbraco 8.17.0] this was working correclty. I was wondering how to solve this.
I think
using Umbraco.Extensions;
should do the trick for you.The problem not solved with that trick.
I created another example maybe this give enough direction to sort out the problem.
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
Umbraco.Web.Common.xml
I'm not sure this is correct and how to solve this.
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?
is working on a reply...