Skip to main content

Posts

Umbraco Forms Migration to .NET Core

Over the past couple of weeks at Umbraco HQ we've been working on the migration of the Forms package to V9 and .NET Core. I've been blogging recently on the topic, where I've shared articles on various aspects of the work needed and changes found in migrating an open-source package. Unsurprisingly though, that didn't cover everything a package developer might encounter, so I thought it was worth an addendum or two on some further topics found in the Forms migration. Source Code and Branching Most developers with a package out for V8 are unlikely to be able to simply call it "done" and start a new repository for V9 - and Forms in no exception. Broadly we expect to align the package with the CMS plans for long-term support , and so we'll still be making bug fixes and, for a while, adding features to the V8 version. I suspect different developers will adopt different approaches here, so whilst your mileage may vary, this is how we've approached
Recent posts

Umbraco Package Migration to .NET Core: Criteria Providers - Distributing and Wrapping Up

This is one of a series of posts looking at migrating Umbraco packages to V9 and .NET Core. Other posts in this series: Introduction A False Start A Clean Start - Controllers, Services, Configuration and Caching Criteria Providers - Working With HttpContext Leaning on Umbraco Migrating Tests Extension Methods Migrations Wiring It All Up Distributing and Wrapping Up Update 29th March, 2021, 18:15 - I've updated this article to discuss how to properly handle the NuGet distribution of content files, which was a problem I was having and discussed in the first publication of this post. Thanks to Bjarke and Warren for sorting me out! Installing the Package This post should be the last one, as - good news - the package works now in V9, and you can try it out if you like, by doing the following. Create an Umbraco project based on the alpha 4 template . Install Umbraco and check the back-office is up and running. Install the package - eit

Umbraco Package Migration to .NET Core: Criteria Providers - Wiring It All Up

This is one of a series of posts looking at migrating Umbraco packages to V9 and .NET Core. Other posts in this series: Introduction A False Start A Clean Start - Controllers, Services, Configuration and Caching Criteria Providers - Working With HttpContext Leaning on Umbraco Migrating Tests Extension Methods Migrations Wiring It All Up Distributing and Wrapping Up Dependency Registration and other Start-up Tasks At this point I've gone some package functionality that compiles and some unit tests that pass, but there's no way to actually run it yet and it won't work if somehow installed into an Umbraco V9 website. In order for that to happen I need to ensure that the services I've created, which are being constructor injected into various classes that need them, are registered with the IoC container. I've also got to make sure the package migration will run and some custom routes are in place for the controllers that the back-

Umbraco Package Migration to .NET Core: Criteria Providers - Migrations

This is one of a series of posts looking at migrating Umbraco packages to V9 and .NET Core. Other posts in this series: Introduction A False Start A Clean Start - Controllers, Services, Configuration and Caching Criteria Providers - Working With HttpContext Leaning on Umbraco Migrating Tests Extension Methods Migrations Wiring It All Up Distributing and Wrapping Up Package Distribution There are at least a couple of ways to distribute Umbraco packages. The original - and still supported in Umbraco V9 - is to create a package through the back-office, selecting the files, schema and content that you wish to include - and saving that into zip file packaged according to a custom format. This file can be uploaded to our.umbraco.com , from where it can be downloaded by other users for install on their projects, or discovered and installed via the back-office. The approach that's more common in the .NET space as a whole, is to distribute via NuGet

Umbraco Package Migration to .NET Core: Criteria Providers - Extension Methods

This is one of a series of posts looking at migrating Umbraco packages to V9 and .NET Core. Other posts in this series: Introduction A False Start A Clean Start - Controllers, Services, Configuration and Caching Criteria Providers - Working With HttpContext Leaning on Umbraco Migrating Tests Extension Methods Migrations Wiring It All Up Distributing and Wrapping Up Migrating Extension Methods The functionality of the Personalisation Groups package is exposed via some extension methods added to Umbraco's IPublishedElement and UmbracoHelper . For example, given a set of content elements drawn from child nodes, a multi-node tree picker or a nested content property, you can show just the ones relevant to the user using something like this: @foreach (var post in Model.Content.Children .Where(x => x.ShowToVisitor())) { <h2>@post.Name</h2> } Umbraco's rendering APIs haven't changed a great deal, so not much modifi