[SOLVED] Hidding Umb version 14 packages form nuge...
# help-with-other
m
With the umbraco 14 release out on nuget now when I look to see if my version 13 has updates NuGet wants me to update to v14. Anyone know if I can do something to tell NuGet I only want packages of version 13.X? I want to stay updated on the LTS only. I am also in VS 2022.
n
You can update your Umbraco package references to use a bound range - [13.0.0, 14)
m
Thanks, I did that but does not seem to be 100% working. I added it to all my pacakges and the ones on the latest 13.X line are not longer showing they have an update but for an addon package Our.Umbraco.TheDashboard I am on 13.0.0 and since there is a 13.0.1 it shows an update but defaulst to trying to update to 14.0. Is ther a way to make it defautl to the latest 13.X line? Last thing I want to do is see an update for a package hit update and be forced over to Umb 14. This is my reference line in the csproj:
n
Maybe try 13.999 as the upper?
m
h
Yes, because they both target the same .net version, I don't think you can do much about that, I've tried many times in the past and yes it is very annoying 🤣🤣
m
Crap, I just know that someday I am going to just hit "update" and burn my site with an unwanted update to 14 or 15. I want to stay on LTS systems only. O well, thanks very much for the help.
h
I'm always very careful to check first 🙂
m
Its why we have back ups and source control RIGHT RIGHT 😄
m
Haha yea...backups.,...haha sure...
s
The only thing that can help is if @Markus Johansson actually limited the install to be v14 only I think.. although I tried this for my package as well and it just figures: "oh well, if this packages requires Umbraco 14 then I'll just go ahead and upgrade that Umbraco 13 site to 14" - I am probably doing it wrong but had no time to dig into that yet.
m
^ thats what nuget does... its why I keep the warning enabled 😄
s
It shouldn't do: it should give me a nice red error saying: you can't do that.. aaaanyway
We're going to be doing this balancing trick for another year or two and then most people will hopefully be on a later umbraco version and we're fine, we make sure all our dependencies are up to date for every major release as well so these struggles should eventually fade away - not that it's not super annoying until that time though.
m
I tend to go with the approach that @huwred outline: Always check package version carefully before installning/upgrading. Can't rely on all package devs to get this right so it comes down to making sure to check the downstream dependencies for packages used.
m
Yea the v14 of the package requires v14 of umb and past experience tells me if i dont pay attention and just hit upgrade the nuget will push the cms to 14 as well which will bork my site. I just have to deal with the annoyance and paranoia of making sure the right version is selected till the next lts comes out and i update to that.
What warning? This might be something i will need to enable for safety from my stupidity
m
The one it shows about licencing and what its going to update/change its a dialog that you can set to never show again.... 😄
No idea how you re-enable it thou
h
Possibly in package manager settings
k
if you lock the umbraco version in the project file.
Copy code
xml
<PackageReference Include="Umbraco.Cms" Version="[13.3.2]" />
then it won't be updated by a package, and things won't build if you accedently add a package that depends on a higher version (e.g v14). equally
Copy code
xml
<PackageReference Include="Umbraco.Cms" Version="[13.3.2, 14)" />
adding a package is a lot less descructive than it was in .net framework, so if you acceditnally add the wrong package and the build hasn't ran, you can almost always change/remove it in the csproj and carry on as if you never did it.
m
I do have them all locked to a max of 14 (just like your example for CMS) just annoying that the default version to install when there is an update is version 14, good to know it won't update me to 14 though. Side note, anyone else annoyed that the version range starts with a [ but ends with a ) 🤣
h
That's so it knows it is a range closing ] denotes an exact match 🙂
The issue are getting is just the way the package manager works unfortunately, but using the version options it will at least warn you 🙂
m
m
Thanks for that link, looks like an interesting read for tonight. I am trying to learn all the little tricks you pros have. I never got lucky to be a real developer and learn this kind of stuff so I have to get around with bugging peoiple with stupid questions and trying to get Google to give me a darn answer in stead of a billion ads
h
That's why we hang around here 🤣
m
Want to hang in my code base and finish all my little things so I can go play DnD tonight instead? 🤣
h
Have fun, not played DnD for a long time.
m
😭
I think I am still going to play DnD tonight. With this figured otu and my recent success on the page refrences I just have "use a block item for images in RTE" thing to figure out. Again, thanks everyone for your input and help.
m
You assume we aren't all googling most of the day your wrong 😄
m
Shhh. your not supposed to tell us Noobs that.
s
Been doing Umbraco for 15 years now, you know what I'm a real PRO at? Googling.. 😂
h
Same here, my wife calls it huwgle because I can always find an answer even after she has tried and failed. It's all about how you ask and knowing the best way to do it, it's a skill in itself 😀
m
Happens with other devs all the time how did you know that?!? I didn't I just googled it here is what I searched 😁
18 Views