Skip to content

Fix server info error on .NET 4.8#6201

Merged
valadas merged 2 commits intodnnsoftware:developfrom
bdukes:fix-server-info-version
Nov 7, 2024
Merged

Fix server info error on .NET 4.8#6201
valadas merged 2 commits intodnnsoftware:developfrom
bdukes:fix-server-info-version

Conversation

@bdukes
Copy link
Copy Markdown
Contributor

@bdukes bdukes commented Nov 7, 2024

When a Version only has two parts (e.g. new Version("4.8")), it throws an exception when calling .ToString(3). This PR adds a string FormattedNetFrameworkVersion property to Globals (to complement Version Globals.NETFrameworkVersion) and replaces all usages of Globals.NETFrameworkVersion.ToString with Globals.FormattedNetFrameworkVersion. This property uses Globals.FormatVersion to do the formatting, which has logic to replace a -1 from a two-digit version with a 0 to make a three-digit version.

I also added a few tests for Globals.FormatVersion to verify its behavior and documented that only the verbose overload has that logic and that Globals.FormatVersion(new Version("4.8")) will output "04.00.-01".

Fixes #6200

@bdukes bdukes added this to the 9.13.6 milestone Nov 7, 2024
Copy link
Copy Markdown
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@valadas
Copy link
Copy Markdown
Contributor

valadas commented Nov 7, 2024

@bdukes looks like one test is failing here:

image

@bdukes
Copy link
Copy Markdown
Contributor Author

bdukes commented Nov 7, 2024

@bdukes looks like one test is failing here:

image

🤦🏻‍♂️ thanks, fix pushed

@valadas
Copy link
Copy Markdown
Contributor

valadas commented Nov 7, 2024

@bdukes Awesome, thanks!

@valadas valadas merged commit 7a31fdc into dnnsoftware:develop Nov 7, 2024
@bdukes bdukes deleted the fix-server-info-version branch November 19, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dnn.PersonaBar.UI.Services.ServerSummaryController.GetServerInfo() ToString fieldCount Net 4.8

3 participants