There'll need to be some code changes to support .NET 5.
The current impl uses a version comparison that includes a sanity check if the versions being compared have alpha prefix.
E.g., given 2 version strings, "netcoreapp2.1" and "netcoreapp3.1", the version comparison will result in the former being less than (earlier) the latter.
If, however, given 2 version strings "netcoreapp3.1" and "net5.0", the code will throw an exception complaining the prefixes don't match.
The impetus for the check was the possibility of having to support .NET Framework. Framework and core have different release trains so the check was to help prevent against, e.g. .NET Framework 4 being considered greater than (newer) .Net Core 2 or 3.
Possible logic changes to support .NET 5 include:
Add custom .Net specific logic to version comparison
Remove prefix when comparing versions (could be .Net specific or a more general laxing of prefix check)
There'll need to be some code changes to support .NET 5.
The current impl uses a version comparison that includes a sanity check if the versions being compared have alpha prefix.
E.g., given 2 version strings, "netcoreapp2.1" and "netcoreapp3.1", the version comparison will result in the former being less than (earlier) the latter.
If, however, given 2 version strings "netcoreapp3.1" and "net5.0", the code will throw an exception complaining the prefixes don't match.
The impetus for the check was the possibility of having to support .NET Framework. Framework and core have different release trains so the check was to help prevent against, e.g. .NET Framework 4 being considered greater than (newer) .Net Core 2 or 3.
Possible logic changes to support .NET 5 include: