I'm exploring Tag Helpers in v9 using https://github.com/umbraco-community/Our-Umbraco-TagHelpers as a reference. Specifically, just trying to get the InlineSvgTagHelper to work, which I can then modify for my own use-case. It's set up and intellisense in VS for the new tag is working, so it's working to an extent. However, I'm getting an error on MediaItem.Url() on line 62. It's saying:
There is no argument given that corresponds to the required formal parameter 'publishedUrlProvider' of 'PublishedContentExtensions.Url(IPublishedContent, IPublishedUrlProvider, string, UrlMode)'
Thanks to Warren Buckley on Discord, this has been resolved now. It was a case of a missing dependency. Installed Umbraco.Cms.Web.Common via Nuget and the .Url() method now works as expected.
Error getting Media URL in Tag Helper
I'm exploring Tag Helpers in v9 using https://github.com/umbraco-community/Our-Umbraco-TagHelpers as a reference. Specifically, just trying to get the InlineSvgTagHelper to work, which I can then modify for my own use-case. It's set up and intellisense in VS for the new tag is working, so it's working to an extent. However, I'm getting an error on
MediaItem.Url()
on line 62. It's saying:Does anyone know how to resolve this?
Many thanks for any pointers.
Thanks to Warren Buckley on Discord, this has been resolved now. It was a case of a missing dependency. Installed
Umbraco.Cms.Web.Common
via Nuget and the.Url()
method now works as expected.is working on a reply...