-1

I have an old MVC application I need to make changes to. It would be nice to update all the recommended NuGet packages, but I know from experience that this can break a project.

In particular, I'm troubled by the following:

enter image description here

If one reads this a certain way, it appears that it's actually suggesting I upgrade to Twitter Bootstrap 5.1.2. I know for a fact that numerous breaking changes have been implemented since my current version.

I prefer not to have to rewrite the site. I thought Updates might have been a little smarter. Do I really need to know each package well enough to know if it would include breaking changes? Is there no way to specify compatible updates? Did Microsoft consider this aspect?

Jonathan Wood
  • 65,341
  • 71
  • 269
  • 466

1 Answers1

1

You do need to know each package well enough. Why? Because there's not a single way of doing versioning. Some packages, probably a lot of packages even, follow Semantic Versioning, but there's nothing to stop anyone from using any versioning they want (even if it doesn't make sense). There's nothing preventing you from going 3.0.1 to 15.14.13 with a change in an unimportant .txt file.

It's your responsibility to know what to update and when. Look at this Q&A to see how you can restrict the versions suggested: NuGet Limit max major version of a package

Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120
  • My understanding was that Microsoft .NET packages are only recommended when they are the same major version. But I've even had some problems with those. – Jonathan Wood Dec 26 '21 at 21:29
  • @JonathanWood I've never experienced that behaviour, and I've used all VS versions from 2010 to 2022. Even then though, some packages never leave version `0.x.y` so it's still not really useful – Camilo Terevinto Dec 26 '21 at 21:42