Upgrade using Sitefinity CLI

Overview

You can use Sitefinity CLI to upgrade your project to Sitefinity CMS version 12.0 or later.

This approach has the following advantages:

  • CLI automatically handles broken or missing references
  • The target framework of the upgraded project is automatically set to the relevant Sitefinity CMS framework version.
  • The CLI automatically fixes binding redirects
  • All Sitefinity projects in the solution are automatically upgraded without the need to manually go through them. 
  • You can include it as a step in a Continuous delivery pipeline.

For more information, see Sitefinity CLI on GitHub.

IMPORTANT: When you run Sitefinity CLI, we recommend that you keep the project under source control, because there is no rollback mechanism in case something goes wrong.
You must not close the Visual Studio that is opened by Sitefinity CLI, because this will cancel the upgrade.

Syntax

The upgrade command has the following syntax:

sf upgrade "{{path to the solution you want to upgrade}}" "{{version you are upgrading to}}"

EXAMPLE: Run the CLI and enter the following command:
sf upgrade "D:\TestProject\SitefinityWebApp.sln" "13.0.7300"

The upgrade command has the following option parameters:

  • --acceptLicense
    This option accepts Sitefinity EULA.
  • --skipPrompts
    This option skips the warning prompt during the upgrade. You can use it, if you want the upgrade to run without the prompt that warns you to keep the project under source control.

EXAMPLE: Run the CLI and enter the following command:
sf upgrade "D:\TestProject\SitefinityWebApp.sln" "13.0.7300" --acceptLicense

If you use this parameter you automatically accept Sitefinity CMS license agreement and do not have to explicitly accept it. You can find the license after the upgrade in the Licenses folder in the Sitefinity package. For example, ~\packages\Progress.Sitefinity.MobileFormats.12.1.7121\LicenseAgreements.

IMPORTANT: Using this parameter means that you automatically accept the license agreement and any changes included in it. If you do not agree to the new license, you must uninstall the product.

Result

When you run the command, the specified version of NuGet packages is downloaded in the folder of the solution. You are prompted to accept the license agreement. A new Visual Studio instance is launched and a NuGet command to install the NuGet packages is started. The upgrade command modifies the references in the .csproj project and binding redirects, if needed. The upgrade command modifies references for Sitefinity projects only.

Was this article helpful?