Copied to clipboard

Flag this post as spam?

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


  • Sean Dooley 271 posts 488 karma points
    Oct 02, 2018 @ 09:25
    Sean Dooley
    0

    Umbraco Package dependencies

    When creating an Umbraco Package that has dependencies on other Umbraco Packages, what is the general approach for including the dependencies?

  • Alex Skrypnyk 5772 posts 21985 karma points MVP 4x admin c-trib
    Oct 06, 2018 @ 21:50
    Alex Skrypnyk
    0

    Hi Sean

    Usually, packages don't have a dependency on another package. There is no such functionality in Umbraco. You can include another package's files to your package if you like, but it's not exactly what you need.

    Thanks,

    Alex

  • Mark Drake 45 posts 177 karma points c-trib
    Oct 07, 2018 @ 04:24
    Mark Drake
    3

    Take a look at how the Stacked Content package page is setup. They have a dependency on InnerContent (another Umbraco Package) and simply put a disaster warning to install InnerContent first.

    What this means is, if people do not install your dependencies first, they run the risk of messing up their Umbraco installation (at least the UI) until they resolve the missing dependency. Not the best UX.

    Lastly, consider creating a Nuget package. I think this will allow you to add / ref dependencies.

  • Sean Dooley 271 posts 488 karma points
    Oct 08, 2018 @ 07:30
    Sean Dooley
    0

    Thanks Alex and Mark.

    Is the disaster warning approach generally the accepted method?

    I do have custom logic that relies on other third-party packages, such as RJP.MultiUrlPicker, which should probably have just a dll reference if in a separate class library.

    I have attempted the NuGet approach but noticed that my package files may not be updated if a file has been modified. This is a particular issue with uSync files.

  • Lee Kelleher 3911 posts 14965 karma points MVP 10x admin c-trib
    Oct 08, 2018 @ 12:25
    Lee Kelleher
    2

    Is the disaster warning approach generally the accepted method?

    It shouldn't be! Currently it's tolerated as we know there isn't a way to do dependencies with the Umbraco package format.

    Matt (Brailsford) and I have looked at various ways of achieving it, (we even made a prototype "multiple package installer package" - how meta!), but when we come to discuss with Umbraco core team it eventually comes around to rather than putting effort into amending the Umbraco package format, maybe the back-office support NuGet format instead?

    Which would require a lot of time/effort (especially as a community collaborator).

    So weighing up our options we went to main package via NuGet (as our recommendation) and disaster warning for Umbraco package.

  • Sean Dooley 271 posts 488 karma points
    Oct 09, 2018 @ 14:05
    Sean Dooley
    0

    Thanks for the advice Lee. I'll try the NuGet approach.

Please Sign in or register to post replies

Write your reply to:

Draft