Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuildDetector is dependent of user's culture #244

Closed
cjberg opened this issue Apr 30, 2023 · 1 comment · Fixed by #245
Closed

MSBuildDetector is dependent of user's culture #244

cjberg opened this issue Apr 30, 2023 · 1 comment · Fixed by #245

Comments

@cjberg
Copy link
Contributor

cjberg commented Apr 30, 2023

Describe the bug

When MSBuildDetector parse version numbers as decimal numbers (doubles), it doesn't specify the invariant culture. Any user with a culture setting that doesn't use a decimal dot* will result in an error.

*) For instance, Swedish and German cultures use decimal comma (14,1 instead of 14.1).

Expected behavior

MSBuildDetector should be able to parse version numbers independent of a user's current culture setting.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Configure a user culture with a decimal comma, e.g., Set-Culture -CultureInfo 'sv-SE' in PowerShell.
  2. Run unit tests for MSBuildDetector.
  3. Many tests fail.

Screenshots

Failed-tests-2023-04-30

Desktop (please complete the following information)

  • OS: Windows
  • Version/Distro: 10 22H2
  • User culture: Swedish (sv-SE, LCID = 1053)

Additional context

I ran into this problem while trying out Porting Assistant for .NET, that simply crashed and was unusable.

I forked this repo and improved the version parsing. I will create and link a pull request after this issue has been submitted.

@JiayuW2
Copy link
Contributor

JiayuW2 commented Apr 30, 2023

Hi cjberg,

We received your feedback. Thanks for providing your feedback about Porting Assistant for .NET. We will be reviewing your recommendation and contact you if we need further information.

Thanks
AWS Porting Assistant Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants