When updating to a new major version of .NET (in this case from .NET 5 to .NET 6) without needing to make any change other than selecting the new target framework in Visual Studio, does this warrant a new major or minor version or does bumping the patch version suffice, when adhering to SemVer-principles?
When I updated from .NET Framework 4.8 to .NET 5, that was a reason to bump the major number imo, as there were a lot of changes made internally, but for the above case I’m not sure.
My app is a local executable for end users, I have no API people will have to rely on. I know it’s not that important under those circumstances, but I’m still new to developing and want to learn it the “right” way from the start.
12
Unless the update to the .NET Framework would affect consumers of the package or its API, I would increment the patch version number when updating dependencies.
Both the major and the minor version numbers are incremented with functional changes, with the major indicating backwards-incompatible changes and the minor indicating backwards-compatible changes. The patch version is for bug fixes, and I would argue other technical enhancements or enablements, that are backwards compatible.
The only case for updating something other than the patch version number would be if you introduced other functional changes at the same time as the dependency updates or if the dependency update could cause a breaking change for some consumers.
Partly, this depends on how your application is distributed. For example, if you are versioning an API that is consumed over HTTP, your dependencies have far less of an impact on consumers than if you are creating a library that gets included into a larger application, where upgrading technical dependencies could require consumers to install additional dependencies or invalidate existing installations upon update.
2
Unless there is a change to the functionality of the code. Don’t change the version number.
You can build your library to target multiple framework versions. The compiled dlls should all have the same version number, .net can tell what framework version each is for.
3