Umbraco latest version upgradation

Hi Team,

I am in the process of upgrading our Umbraco instance from version 14.3.1 (which contains known vulnerabilities) to the latest stable release 16.2.0. As part of this upgrade, I have also updated the project’s .NET version from 8 to 9 to meet the requirements of Umbraco 16.

However, during the upgrade process, I am encountering version downgrade errors related to the following NuGet packages:

  • Microsoft.EntityFrameworkCore.SqlServer (currently referenced version: 8.0.10)

  • Azure.Identity (currently referenced version: 1.13.1)

Could you please advise on the correct and compatible versions of these libraries that align with Umbraco 16.2.0 and .NET 9?

Thank You

Best thing to do if you’re not sure is to create a test project with the v16.2.0 and compare.

What @cheeseytoastie said! Those two are not direct dependencies of Umbraco CMS, so I think you might have installed those yourself.

In general we (Umbraco) try to update all of the CMS dependencies to the very newest version for each release so that way you as an Umbraco implementer can also do the same. So I’d say: try to upgrade those dependencies to their latest stable versions.

However, while upgrading Umbraco to version 16.2.0, we are prompted to downgrade the following two packages to lower versions. We are concerned that downgrading these existing packages may have unintended side effects or impact other parts of the application.

What I usually do with these bigger upgrades: I go into all of my .csproj files and align them all to be the same (latest) version of everything. I find that Visual Studio makes me jump through too many hoops to get there.

So open the .csproj files throughout your solution, find the package references, like:

  <ItemGroup>
    <PackageReference Include="Cultiv.Hangfire" Version="4.1.3" />
    <PackageReference Include="LiteDB" Version="4.1.4" />
    <PackageReference Include="System.ServiceModel.Syndication" Version="9.0.8" />
    <PackageReference Include="Umbraco.AuthorizedServices" Version="16.0.0" />
    <PackageReference Include="Umbraco.Cms" Version="16.2.0" />
    <PackageReference Include="uSync" Version="16.0.4" />
  </ItemGroup>

And then I go to NuGet and go:
https://www.nuget.org/packages/Cultiv.Hangfire - latest is 4.1.3 - all good
https://www.nuget.org/packages/LiteDb - latest is 5.0.21, so change that in all the .csproj files: <PackageReference Include="LiteDB" Version="5.0.21" />.
… and so on!

This is usually only needed for the bigger upgrade jumps, usually really only when the .NET version changes because you easily get these downgrade messages from VS.

Thank you for your suggestion.

I have upgraded the project to version 16.2.0 and manually updated the package versions to the latest in the .csproj file. However, the project is still not functioning correctly.

You’ll need to explain what that means. If the NuGet upgrade succeeded now, no more errors in Visual Studio around NuGet packages then I would create a new thread, because now you have a new problem. And then you can link to this thread for background info.

I have upgraded the Umbraco version to 16.2.0 and manually updated the version of the problematic library in the .csproj file. The version had been downgraded during the Umbraco upgrade, which was causing errors.

After these changes, there are no build errors, but the solution is still not running. This issue started occurring only after the Umbraco upgrade.

For reference, I’ve attached the log file screenshot

That looks like a failed upgrade of the db.

Did you take a backup of the DB first? Can you roll back. I’d suggest trying a stepped upgrade to 16.0 then to latest. There is a fix in v16.3 to fix an upgrade issue which is possibly what you’ve hit here.

If you haven’t got a backup then you might need some help to run the migrations manually where it’s stopped.

Might also have to do an interim step to 16.1.1 as mentioned here… (though I do note you are starting from 14.3.1)

This is not the same error, the error here is very unexpected, a missing umbracoUser table.. that doesn’t happen. I would think the database is not even connected in this case? :sweat_smile:

Ah - you’re right… I think I’ve seen this with a borked db connection.

Have they hit the old need TrustServerCertificate=True on the db connection string!? I can’t find what version this was required from to point at the documentation / upgrade notes. Surely it was in v14?

I have tried to upgrade to version 16.1.1 instead of 16.2.0 but getting the same errors as shown below :

Hard to know what you’re doing now.

Have you rolled everything back to do this - code and DB?

Have you checked your DB Connection string contains TrustServerCertificate=True as per step 8 here

Suggestions in this post are to roll back, step from your v14 to v16.0.0 → v16.1.1 → v16latest.

In each step start up - let the DB update.

If you’re struggling with the nuget package manager showing version downgrade errors at any point then switch to amending the version in the .csproj as Sebaastian suggests.

This should all be smoother with v16.3 - rules out one migration issue anyhow.

Hi everyone,

Thank you all for your support.

I have successfully upgraded the Azure.Identity package to the latest stable version 1.16.0 and the Microsoft.EntityFrameworkCore.SqlServer package to version 9.0.0. Following that, I upgraded Umbraco to version 16.2.0. Additionally, I inserted a value of -345 with the name ‘DocumentUrlRebuild’ into the umbracoLock table in the database.

All upgrades have been completed successfully.

1 Like