Skip to main content

Umbraco Package Migration to .NET Core

Umbraco 9 on .NET Core

As a member of the community team working on the transition of the Umbraco CMS to .NET Core, I've been involved in various stages of the development, from the reading the initial architecture plans through to supporting the release of the alpha versions. Now working for Umbraco, with a responsibility for the commercial packages Forms and Deploy, my attention is turning to the update of packages to work with the new version.

Umbraco CMS offers a lot out of the box of course, but it really shines when augmented by the imagination and know-how of the community in the form of the many open-source and commercial packages available to extend the platform. As such it's in everyone's interest - HQ, community, package authors and solution implementors - that we can make it easy as possible to migrate packages and to support each other in doing so.

Authors of new and existing packages will likely have a mix of experience with .NET Core itself. It's not new any more of course, but inevitably as developers focussing on building solutions using Umbraco CMS, many will have spent most of their time over the past few years working with .NET Framework. Fortunately, many .NET developers have worked their way up the learning curve in picking up the new platform, so there's a wealth of general resources in the form of documentation, books, courses and blog posts to support us along the way.

Changes to Umbraco itself going from version 8 to 9 have been kept to a level which will help the transition - there's very little change for example to the database and service APIs, and none to the front-end. But there are some of course, many of which are inevitable just as things are done differently with .NET Core. Others - e.g. configuration, logging, dependency injection and hosted services - are concious decisions to move away form custom Umbraco techniques to those more generally used in the .NET Core ecosystem, thus hopefully making the product more familiar to developers coming to Umbraco new.

Supporting Resources

There are a few resources coming together to support package migration and website development using Umbraco 9, which I'll list for reference (and add to over time if I find more):

  • Umbraco Documentation - this is a new, work in progress repo being populated with documentation for version 9.
  • Forum on Our - a new category created for questions, answers and discussions on version 9.
  • The source code for V9 - found in the netcore/dev branch.
  • DoStuffWithUmbraco - a handy collection of "how to do stuff in v9 compared to v8" being maintained by community package team member Kevin Jump.

Migrating a Package

And hopefully adding to that list is this blog series, where I'm going to look at migrating a package, discussing the decisions, problems and solutions as I go. As mentioned, in the upcoming weeks I and others in the team will be looking at upgrading the Umbraco commercial packages to .NET Core and to run on the new version of Umbraco. They are closed source though, as well as being relatively large code-bases when compared to many (but by no means all) packages. Hence to start with, i thought it would be a good idea to focus on a simpler and open one, and so have picked one of my own to look at - Personalisaton Groups.

Of course I could just work on this quietly, and with a bit of luck do the reveal in a few weeks time and say how easy it was. But actually I suspect the journey will be useful to document as I go, and perhaps the mistakes and choices almost as useful as the final result. And I've certainly got plenty to learn on the way.

I'll keep this index pages updated with links to the subsequent articles written after working on various bits, and you can find the work in progress repository here.

  1. Introduction
  2. A False Start
  3. A Clean Start - Controllers, Services, Configuration and Caching
  4. Criteria Providers - Working With HttpContext
  5. Leaning on Umbraco
  6. Migrating Tests
  7. Extension Methods
  8. Migrations
  9. Wiring It All Up
  10. Distributing and Wrapping Up

Comments