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

Fix MSBuildVersionMajorMinor assignment #42210

Closed
wants to merge 5 commits into from

Conversation

YuliiaKovalova
Copy link
Member

@YuliiaKovalova YuliiaKovalova commented Jul 17, 2024

Workarounds: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2111557/?view=edit

The issue is caused by ToString usage. On the first evaluation iteration, this method can't be resolved ,because MSBuild doesn't parse the argument "2" as integer, so runtime can't resolve the right method from System.Version.

image

image

System.Version lib provides a secure way to parse major/minor version parts.

Testing

Manual, the evidence is provided on the screenshot above.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Jul 17, 2024
@YuliiaKovalova YuliiaKovalova marked this pull request as draft July 17, 2024 12:36
@YuliiaKovalova
Copy link
Member Author

related to the bug in MSBuild: dotnet/msbuild#10393

@baronfel
Copy link
Member

Thanks for digging into this, what a subtle issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants