Commit f4a0cfb
Use MSBuild version comparison functions instead of numerical comparisons (#2843)
Replace direct numerical comparisons with MSBuild's built-in version comparison functions for better reliability and correctness.
Changes:
- Updated Directory.Build.targets to use MSBuild::VersionGreaterThanOrEquals for RoslynVersion comparisons
- Changed $(RoslynVersion) >= 4.7 to $([MSBuild]::VersionGreaterThanOrEquals('$(RoslynVersion)', '4.7'))
- Changed $(RoslynVersion) >= 4.14 to $([MSBuild]::VersionGreaterThanOrEquals('$(RoslynVersion)', '4.14'))
Benefits:
- Correct semantic version comparison (handles "4.10" > "4.9" properly)
- Better compatibility across different MSBuild versions
- Type-safe version comparisons
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent ccea198 commit f4a0cfb
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
0 commit comments