Upgrade fails for 11.4.2 site upgrading directly t...
# help-with-umbraco
c
When upgrading some sites via Nuget in Rider on Linux I'm getting the following error message:- > 13:17:23| [Notification][Install] Install failed (project: Web, package: Umbraco.Cms v12.0.1) > Package restore failed. Rolling back package changes for 'Web'. > Version conflict detected for Umbraco.Cms.Web.Common. Install/reference Umbraco.Cms.Web.Common 12.0.1 directly to project Web to resolve this issue. > Web -> Umbraco.Cms 12.0.1 -> Umbraco.Cms.Targets 12.0.1 -> Umbraco.Cms.StaticAssets 12.0.1 -> Umbraco.Cms.Web.Website 12.0.1 -> Umbraco.Cms.Web.Common (>= 12.0.1) > Web -> Umbraco.Forms 11.2.0 -> Umbraco.Forms.Core.Providers 11.2.0 -> Umbraco.Cms.Web.Common (>= 11.0.0 && < 12.0.0). This is the simplest of sites with just a couple of packages installed. All of which are at the right versions for the 11.4.2 site AFAIK Any advice appreciated.
s
c
Tbh, I don't understand it (the answer, as well as why upgrades on simple sites should fail). I've got 6 mores sites to upgrade 😦
s
Do you have Forms 11.2 installed? If so, you need to upgrade that one too.
c
I have Forms 11.2 installed. So do I have to upgrade Forms before the CMS then?
I generally upgrade everything at once then build and run
Thanks, that was the key. Upgrade the CMS last. It's worked, so thank you.
Having now upgraded 3 sites (yes, it doesn't take long when it works ;)), I can tell you the best protocol is to upgrade UmbForms first. It even prevents uSync upgrading if forms are not upgraded.
s
Upgrade them all in one go?
c
They were 11.2.? sites upgraded via 11.4.2 to 12.0.1 which I thought was what had to be done.
Turns out, the sites I upgraded were SQLite sites that didn't need uSync imports. When I moved on to sites with SQL DB's where the best course of action, on my particular hosting, is to create a new DB, install into that then pull in the content with uSync, it was a disaster. Had to revert and will wait till a few things are patched. 11.4.2 reporting itself as 12.0.0 was a bit of a shocker. As I thought you had to upgrade to 11.4.2 before 12.0.1 I think that's possibly what's caused issues. I see others have had issues on the forum as well. Think I'll wait till the dust settles before trying again. I have raised issues on the CMS and uSync repos.
The 11.4.2 reporting as 12.0.0 situation is covered and solved here. Though why uSync should cause an auto-upgrade illudes me : https://github.com/umbraco/Umbraco-CMS/issues/14562
k
uSync v12 - has a dependency on
Umbraco.Cms.Web.Website
&
Umbraco.Cms.Web.BackOffice
at v12 - and this https://learn.microsoft.com/en-us/nuget/concepts/dependency-resolution#cousin-dependencies explains why uSync v12 will upgrade some packages in the background - Ideas on how to stop it without the need for changes the Core Umbraco packages welcome. (this is not just an uSync issue, assuming many packages will do the same if you installed v12 versions on v11).
s
This is default NuGet behavior - NuGet is difficult to grasp. The only way to avoid is to not have direct dependencies. But you NEED the Umbraco dependency so I wouldn't recommend that either.
k
I think it might be referencing the Umbraco.CMS package but not including anything - e.g
Copy code
<PackageReference Include="Umbraco.Cms" Version="12.0.0" ExcludeAssets="all" />
but that actually means you don't get the reference in the package, however
Copy code
<PackageReference Include="Umbraco.Cms" Version="12.0.0" ExcludeAssets="contentfiles" />
does seem to do something and it doesn't increase the size of the nuget package, so it might be that.
but i will have to test make sure we don't screw something else up.
might be we do it with wildcards etc.
Copy code
<PackageReference Include="Umbraco.Cms" Version="[12, 13)" ExcludeAssets="contentfiles" />
s
Yeah I guess that's the other way and that's what we do for some HQ packages. However.. that's where the "fun" starts: suddenly now you can not update ANY NuGet packages because one of them depends on Umbraco v12 already being there but you can't update the Umbraco.Cms package because uSync (for example) can not work with anything else but v11 so now you're in a mexican standoff. Which.. then leads to this: https://discord.com/channels/869656431308189746/1129056982259732582/1129063894086856817
k
yeah - maybe the upper limit could be removed, but then v12 might not actually work with v13. (or v14) so it causes other problems. - Oh well. maybe we won't do this 🙂
6 Views