Skip to main content
3 of 3
Improve formatting. Transcribe image into plain text.
Marcel Gruber
  • 2.3k
  • 1
  • 18
  • 38

Script on "Create public links for approved assets automatically" documentation page does not compile

The Sitecore Content Hub documentation provides an example script that does not compile.

When trying to run the script, it encounters several compile errors. For instance:

Build error screenshot

Error CS0103: The name 'entities' does not exist in the current context (Line 7, Columns 31 and 52)
Error CS0029: Cannot implicitly convert type 'long' to 'bool' (Line 16, Column 5)
Error CS1026: ) expected (Line 16, Column 34)
Error CS1002: ; expected (Line 16, Column 35 and Line 37, Column 41)
Error CS7017: Member definition, statement, or end-of-file expected (Line 16, Column 35)
Error CS8917: The delegate type could not be inferred. (Line 37, Column 18)
Error CS1955: Non-invocable member 'IChildToManyParentsRelation' cannot be used like a method. (Line 37, Column 41)

Has anyone else encountered this issue or knows how to resolve it?

Dan Solovay
  • 2.2k
  • 18
  • 31