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.
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.
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.
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.
Umbraco Package dependencies
When creating an Umbraco Package that has dependencies on other Umbraco Packages, what is the general approach for including the dependencies?
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
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.
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.
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.
Thanks for the advice Lee. I'll try the NuGet approach.
is working on a reply...