Upgrading from latest U12 to U13
s
I have a hobby project running Umbraco 12.3.10 that I would like to upgrade to Umbraco 13.0.0 But when I try like this
dotnet add package Umbraco.Cms --version 13.0.0
I get this error:
Copy code
error: NU1202: Package Umbraco.Cms 13.0.0 is not compatible with net7.0 (.NETCoreApp,Version=v7.0). Package Umbraco.Cms 13.0.0 supports: net8.0 (.NETCoreApp,Version=v8.0)
error: Package 'Umbraco.Cms' is incompatible with 'all' frameworks in project '/Users/dammark/Workspace/Simply/hfk2023/hfk2023.csproj'.
But when I do a
dotnet --info
it seems that
net8.0
is already installed Any ideas on what's going on ? https://cdn.discordapp.com/attachments/1259886508656295987/1259886508987515030/image.png?ex=668d503f&is=668bfebf&hm=8505aa93e6a157d627dadf6b8e38bcdeb99f13731b31e2e0ea3091a0956c0d18&
r
You have .net 8 installed, but you also need to upgrade the project(s) themselves to use it - they'll specify the .net version in the csproj files in the
<TargetFramework>
tag, e.g.
<TargetFramework>net7.0</TargetFramework>
. Here's a list of breaking changes between 7 and 8 just in case it affects you: https://learn.microsoft.com/en-us/dotnet/core/compatibility/8.0
s
Ahhh ... of course. 🙂 Thank you.
j
just throwing it out there as we've got tripped up with this before... we've found it safer/easier when doing an upgrade to do a fresh install of which ever version we're going to of v9+ and then copying the views and any settings back in. the main reason being that you defo know you've got everything from whichever dotnet template you want: https://www.nuget.org/packages/Umbraco.Templates good example would be the
Program.cs
and
StartUp.cs
changes between v12 and v13 (in that there's no longer a
StartUp.cs
in v13 😉 ) it also makes it easier to spot any changes in the
appSettings.config
file - for example, v13 added
UpgradeUnattended
which we would've missed had we just upgraded the packages:
Copy code
"Unattended": {
    "UpgradeUnattended": true
}
takes a little while longer but defo makes sure your site is using the correct version template 🤘
5 Views