Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
---
description: Learn how to migrate a Konstrukt solution to Umbraco UI Builder.
description: Step-by-step guide to migrating a Konstrukt solution to Umbraco UI Builder.
---

# Migrate from Konstrukt to Umbraco UI Builder

This guide provides a step-by-step approach to migrating a default Konstrukt solution to Umbraco UI Builder.
This guide walks you through migrating a default Konstrukt solution to Umbraco UI Builder.

## Key changes
## Key Changes

Before outlining the exact steps, there are a few key changes to be aware of.

These changes will dictate the steps to take in the process of migrating to Umbraco UI Builder.
Before starting, review these key changes that impact the migration process.

### Project, Package, and Namespace changes

Expand All @@ -23,40 +21,44 @@ These changes will dictate the steps to take in the process of migrating to Umbr
| Konstrukt.Startup | Umbraco.UIBuilder.Startup |
| Konstrukt | Umbraco.UIBuilder |

### Code and UI Changes

<details>

<summary>C# Class changes</summary>
<summary>C# Class Changes</summary>

* Namespace changes as documented above.
* Most classes prefixed with the `Konstrukt` keyword have had this prefix removed.
* Examples: `IKonstruktRepository` is now `IRepository`
* Exclusions: The root level `KonstruktConfig` and `KonstruktConfigBuilder` have a `UIBuilder` prefix instead, and the `AddKonstrukt` extension for `IUmbracoBuilder` has been replaced by `AddUIBuilder`
* Namespace changes as mentioned above.
* Most `Konstrukt`-prefixed classes have had the prefix removed.
* Examples: `IKonstruktRepository` -> `IRepository`
* Exceptions:
* `KonstruktConfig` and `KonstruktConfigBuilder` now use a `UIBuilder` prefix.
* `AddKonstrukt` extension for `IUmbracoBuilder` is now `AddUIBuilder`

</details>

<details>

<summary>JavaScript changes</summary>
<summary>JavaScript Changes</summary>

* All `Konstrukt` controllers have changed namespace to `Umbraco.UIBuilder`.
* All `Konstrukt` prefixed directives, services, and resources are now prefixed with `uibuilder`.
* All `Konstrukt` controllers are now under the `Umbraco.UIBuilder` namespace.
* All `Konstrukt` prefixed directives, services, and resources now use `uibuilder`.

</details>

<details>

<summary>UI Changes</summary>

* All static UI assets are served via a Razor Compiled Library (RCL) and are no longer found in the `App_Plugins` folder.
* The folder with `App_Plugins` has been renamed from `Konstrukt` to `UmbracoUIBuilder`.
* All static UI assets are now served via a Razor Compiled Library (RCL) instead of being stored in the `App_Plugins` folder.
* The `App_Plugins/Konstrukt` folder is now `App_Plugins/UmbracoUIBuilder`.

</details>

## Step 1: Replace dependencies
## Step 1: Replace Dependencies

In this first step, we will be replacing all existing Konstrukt dependencies with Umbraco UI Builder dependencies.
Replace all existing Konstrukt dependencies with Umbraco UI Builder dependencies.

1. Remove any installed Konstrukt packages:
1. Remove existing Konstrukt packages:

```bash
dotnet remove package Konstrukt
Expand All @@ -76,14 +78,15 @@ dotnet add package Umbraco.UIBuilder

4. Compile your project against .NET 7.0.

## Step 2: Update namespaces and entity names
## Step 2: Update Namespaces and Entity Names

Based on the [Key Changes](./#key-changes) outlined above update all Konstrukt references to the new Umbraco UI Builder alternatives. Ensure you update any Views/Partials that also reference these.
Update all Konstrukt references to their Umbraco UI Builder alternatives. Ensure you update any Views/Partials that also reference these. See the [Key Changes](./#key-changes) section for reference.

## Step 3: Update your configuration
## Step 3: Update Configuration

If all your configuration is in a single statement, it would be a case of swapping `AddKonstrukt` to `AddUIBuilder`. If you broke your configuration into multiple steps, or are using `Action` or `Card` classes, you will need to update the config builder/base classes. Those classes need to be updated to their UI Builder alternative names as detailed in [Key Changes](./#key-changes).
If your configuration is in a single statement, replace `AddKonstrukt` with `AddUIBuilder`.

For multi-step configurations using `Action` or `Card` classes, update the **config builders** and **base classes** to their UI Builder alternatives as described in [Key Changes](./#key-changes).

```csharp
builder.CreateUmbracoBuilder()
Expand All @@ -97,12 +100,12 @@ builder.CreateUmbracoBuilder()
.Build();
```

## Step 4: Finalizing the migration
## Step 4: Finalize the Migration

1. Delete any obj/bin folders in your projects to ensure a clean build.
2. Recompile all projects and ensure all dependencies are restored correctly
3. Delete the existing Konstrukt license files in the `umbraco\Licenses` folder.
4. Add your new Umbraco.UIBuilder license key to the `appSettings.json` file:
1. Delete `obj/bin` folders for a clean build.
2. Recompile all projects and ensure all dependencies are restored correctly.
3. Remove existing **Konstrukt** license files from `umbraco\Licenses` folder.
4. Add your **Umbraco.UIBuilder** license key to the `appSettings.json` file:

```json
"Umbraco": {
Expand Down
57 changes: 38 additions & 19 deletions 15/umbraco-ui-builder/upgrading/upgrade.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,65 @@
---
description: Learn how to manually upgrade Umbraco UI Builder to the latest version.
---

# Upgrading Umbraco UI Builder

This article shows how to manually upgrade Umbraco UI Builder to run the latest version.
When upgrading Umbraco UI Builder, be sure to also consult the [version specific upgrade](version-specific.md) notes to learn about potential breaking changes and common pitfalls.
This article explains how to manually upgrade Umbraco UI Builder to the latest version. Before upgrading Umbraco UI Builder, see the [Version Specific Upgrade Notes](version-specific.md) for potential breaking changes and common pitfalls.

{% hint style="warning" %}
Before upgrading, it is always advisable to take a complete backup of your site and database.
Before upgrading, take a complete backup of your site and database.
{% endhint %}

## Get the latest version of Umbraco UI Builder

To upgrade to the latest version of Umbraco UI Builder you can use:
To get the latest version of Umbraco UI Builder, you can upgrade using either of the two options:

- NuGet
- Visual Studio
- [NuGet](#nuget)
- [Visual Studio](#visual-studio)

### NuGet

- NuGet installs the latest version of the package when you use the `dotnet add package Umbraco.UIBuilder` command unless you specify a package version: `dotnet add package Umbraco.UIBuilder --version <VERSION>`
- To install the latest version via NuGet:

```sh
dotnet add package Umbraco.UIBuilder
```

- To specify a package version:

- After you have added a package reference to your project by executing the `dotnet add package Umbraco.UIBuilder` command in the directory that contains your project file, run `dotnet restore` to install the package.
```sh
dotnet add package Umbraco.UIBuilder --version <VERSION>
```

- After adding the package reference, restore dependencies:

```sh
dotnet restore
```

### Visual Studio

1. Go to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution...` in Visual Studio, to upgrade Umbraco UI Builder:
2. Select **Umbraco.UIBuilder**.
3. Select the latest version from the Version drop-down and click Install.
4. When the command completes, open the **.csproj** file to make sure the package reference is updated:
1. Open Visual Studio.
2. Navigate to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution...`.
3. Select **Umbraco.UIBuilder**.
4. Choose the latest version from the drop-down and click **Install**.
5. After installation, verify the update in your **.csproj** file:

```xml
<ItemGroup>
<PackageReference Include="Umbraco.UIBuilder" Version="xx.x.x" />
</ItemGroup>
```

If you are using one or more of the below sub-packages, they also need to be upgraded as well:
## Upgrade Sub-Packages

If you are using any of the following sub-packages, upgrade them as well:

| Sub-package | Description |
| -- | -- |
| Umbraco.UIBuilder.Core | Core UI Builder functionality that doesn't require any infrastructure-specific dependencies |
| Umbraco.UIBuilder.Infrastructure | Infrastructure-specific project containing implementations of core UI Builder functionality |
| Umbraco.UIBuilder.Web | The core UI Builder logic that requires a web context |
| Umbraco.UIBuilder.Web.StaticAssets | The static assets for the UI Builder presentation layer |
| Umbraco.UIBuilder.Startup | The main logic for registering UI Builder with Umbraco |
| Umbraco.UIBuilder | The main UI Builder package |
| Umbraco.UIBuilder.Core | Core functionality without infrastructure dependencies |
| Umbraco.UIBuilder.Infrastructure | Infrastructure-specific implementations |
| Umbraco.UIBuilder.Web | Core logic requiring a web context |
| Umbraco.UIBuilder.Web.StaticAssets |Static assets for the presentation layer |
| Umbraco.UIBuilder.Startup | Registers UI Builder with Umbraco |
| Umbraco.UIBuilder | The main UI Builder package |
16 changes: 7 additions & 9 deletions 15/umbraco-ui-builder/upgrading/version-specific.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
---
description: >-
Version specific documentation for upgrading to new major versions of Umbraco UI Builder.
Version specific documentation for upgrading to major versions of Umbraco UI Builder.
---

# Version Specific Upgrade Notes

This page covers specific upgrade documentation for when migrating to major 14 of Umbraco UI Builder.
This article provides upgrade instructions for major versions of Umbraco UI Builder.

{% hint style="info" %}
If you are upgrading to a new minor or patch version, you can find information about the breaking changes in the [Release Notes](../release-notes.md) article.
For minor or patch upgrades, check the [Release Notes](../release-notes.md) for breaking changes.
{% endhint %}

## Version Specific Upgrade Notes History
## Upgrade to Version 14

Version 14 contains a number of breaking changes from the previous, Konstrukt product.
Version 14 introduces breaking changes from the previous Konstrukt product. For full migration details, see the [Migrate from Konstrukt to Umbraco UI Builder](./migrating-from-konstrukt-to-umbraco-ui-builder.md) article.

See the [Migrate from Konstrukt to Umbraco UI Builder guide](./migrating-from-konstrukt-to-umbraco-ui-builder.md) for full details.
## Legacy Version Upgrade Notes

## Legacy version specific upgrade notes

You can find the version specific upgrade notes for versions out of support in the [Legacy documentation on GitHub](https://github.com/umbraco/UmbracoDocs/tree/umbraco-eol-versions).&#x20;
For out-of-support versions, see the [Legacy documentation on GitHub](https://github.com/umbraco/UmbracoDocs/tree/umbraco-eol-versions).