Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Trying to build a store using razor scripts I've used several times before. For some reason, it's not recognising the assemblies I'm referencing.
For example, this:
@using UCommerce.Xslt; @{ string url = Library.GetNiceUrlForCatalog("27"); @url}
Throws the error:
'umbraco.MacroEngines.Library.RazorLibraryCore' does not contain a definition for 'GetNiceUrlForCatalog'
The script is trying to use the Umbraco.Library and not the specified uCommerce assembly. This works, so it's definitely there
@{ string url = UCommerce.Xslt.Library.GetNiceUrlForCatalog("27"); @url}
As mentioned, these work fine on other shops. Any suggestions as to why this could be?
I guess there's class name conflicts with other 'Library' classes, so you could add this one on top
@using lib = UCommerce.Xslt.Library;
and then use
lib.GetNiceUrlForCatalog("27');
Hope this helps.
Regards,
/Dirk
Yeah, that works.
Damn strange it's fine in my other stores
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
"@using UCommerce.Xslt;" Not being recognised
Trying to build a store using razor scripts I've used several times before. For some reason, it's not recognising the assemblies I'm referencing.
For example, this:
@using UCommerce.Xslt; @{ string url = Library.GetNiceUrlForCatalog("27"); @url}
Throws the error:
The script is trying to use the Umbraco.Library and not the specified uCommerce assembly. This works, so it's definitely there
@{ string url = UCommerce.Xslt.Library.GetNiceUrlForCatalog("27"); @url}
As mentioned, these work fine on other shops. Any suggestions as to why this could be?
I guess there's class name conflicts with other 'Library' classes, so you could add this one on top
and then use
lib.GetNiceUrlForCatalog("27');Hope this helps.
Regards,
/Dirk
Yeah, that works.
Damn strange it's fine in my other stores
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.