Umbraco 15+ Extension Tool: Streamlining Package Development

Creating packages in Umbraco has always been an essential part of extending its functionality, but it could sometimes be a tedious process filled with repetitive setup steps. With the introduction of the Umbraco 15+ Extension Tool, this process has been simplified significantly. This tool allows developers to quickly scaffold a new package project with a preconfigured setup that follows Umbraco's best practices. In this post, we’ll take a high-level look at this tool, explore how it speeds up package development, and highlight how the new example content feature can help you get started even faster.

What Is the Umbraco Extension Tool?

The Umbraco Extension Tool is a feature introduced in Umbraco 15+. It’s designed to streamline the creation of Umbraco packages by generating a basic project structure with just a single command or a few clicks. By using this template, you can quickly create a package that includes all the essential files and configurations you need, saving you from setting everything up from scratch.

With the Extension Tool, the project template automatically incorporates Umbraco’s recommended structure for packages, so you can focus on building the functionality rather than worrying about the underlying setup. Whether you’re working through the .NET CLI or Visual Studio, this tool will help you hit the ground running.

Easy Package Scaffolding with Basic Setup

The main benefit of the Umbraco Extension Tool is the speed and ease it provides in scaffolding a new package. By using the official umbraco-extension template, you can create a fresh project in just a few seconds (check the official docs for more details). The generated project includes the core folder structure and configurations that every Umbraco package needs, like:

  • Client folder for front-end assets (JavaScript, CSS, HTML views for backoffice UI)

  • Composers folder for C# classes that register your components

  • Controllers folder for API controllers

  • Constants.cs for global constants

This structure is essential for developing a clean, maintainable package. It’s like a blueprint that ensures your extension is built the right way from the start.

Additionally, the .csproj file is pre-configured to support NuGet packaging, so you can compile your project into a distributable package right away. With all this setup handled automatically, you can skip the manual configuration and focus on coding the functionality of your package.

Note: If you're familiar with earlier versions of Umbraco, the new template is leaner. It doesn’t automatically include an App_Plugins folder or package.manifestyou start with just the essentials, and you add only what you need for your package. For example, if your package includes backoffice UI files, you can create an App_Plugins/YourPackageName folder and add your files there (refer to the official guide).

Including Example Content for Guidance

Another great feature of the Umbraco Extension Tool is the ability to include example content when generating your package. This is particularly useful for developers who are new to Umbraco or those looking for a quick reference to understand how to implement common features.

The example content might include things like a sample dashboard or a custom section, allowing you to see a working example of how your package can be integrated into an Umbraco site. This feature helps you quickly visualize the end result and provides a tangible reference that can be modified to suit your needs.

Additionally, when you define your package, you can choose to include content nodes, media, and document types. This option is invaluable for packages that serve as starter kits or demo setups. When the package is installed, the example content is automatically added to the Umbraco site, giving end-users a ready-to-go example of how your extension works.

The inclusion of example content also benefits package developers. It allows you to verify that your extension is wired up correctly and functioning as expected. For developers consuming the package, it offers a practical guide for using the new functionality in a live environment.

How This Helps Umbraco 15+ Developers

The Umbraco Extension Tool significantly lowers the barrier to package creation. It eliminates the need for developers to manually configure all the pieces required to start building a package, saving both time and effort. From a new project to a working package in just a few minutes, this tool ensures that the basic setup is always correct and aligned with Umbraco’s best practices.

By providing a simple and consistent scaffolding process, the tool allows developers to focus on the actual functionality of their packages rather than wasting time on project structure. Plus, the example content option speeds up the learning curve, offering a practical reference for both developers and users.

Overall, the Umbraco Extension Tool offers a clean, pragmatic foundation for building packages in Umbraco 15+. It accelerates development, minimizes the chances of misconfiguration, and provides a smoother experience when extending Umbraco’s functionality.

Opinionated Package Starter (by Lotte Pitcher)

For developers looking for even more scaffolding, the Opinionated Package Starter by Lotte Pitcher offers a more comprehensive solution. Building on the official extension template, this community-driven project adds all the surrounding structure needed to build, test, and publish a package with ease.

While the official Umbraco extension template is a solid starting point, it only generates the basic class library for the package. The Opinionated Package Starter fills in the gaps by providing a fully structured solution that includes:

  • A sample Umbraco site for testing

  • GitHub Actions workflows for continuous integration and automatic publishing to NuGet

  • A ready-to-use Visual Studio solution that can be installed and tested on an Umbraco site

  • Best-practice defaults for licensing, naming conventions, and setup files

This starter template goes beyond the basics, ensuring your package is not only easy to develop but also ready for release with all the necessary components for publishing on the Umbraco Marketplace.

The Opinionated Package Starter is particularly useful for developers looking to save time and follow best practices while creating their packages, making it an excellent tool for anyone building community-driven extensions for Umbraco.

Conclusion

The Umbraco 15+ Extension Tool offers a significant leap forward in simplifying the process of creating packages for Umbraco. It handles all the boilerplate setup for you, leaving you with more time to focus on building the actual functionality of your extension. With the added ability to include example content, the tool also serves as a powerful learning resource, both for developers and end-users. Whether you're new to Umbraco or a seasoned developer, the Extension Tool will make package creation faster, easier, and more efficient.

For even more help, check out the Opinionated Package Starter for a fully-prepared, best-practice project structure, making your journey from development to release even smoother.

Sources

Â