Skip to content

[msbuild-quality] Fix MSBuild condition quoting and DotnetFsiCompilerPath typo#19990

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
msbuild-quality/fix-conditions-2026-06-24-ee38900703f2c952
Draft

[msbuild-quality] Fix MSBuild condition quoting and DotnetFsiCompilerPath typo#19990
github-actions[bot] wants to merge 1 commit into
mainfrom
msbuild-quality/fix-conditions-2026-06-24-ee38900703f2c952

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Fixes issues identified by the MSBuild file quality review.

Changes

Bug fixsrc/FSharp.Build/Microsoft.FSharp.NetSdk.props line 79:

  • DotnetFsiCompilerPath condition was checking DotnetFscCompilerPath (copy-paste error)
  • Since DotnetFscCompilerPath is always set on line 75, the condition was always false, so DotnetFsiCompilerPath was never configured in the SDK flow
  • Fixed to check DotnetFsiCompilerPath instead

Condition quoting — 4 files had unquoted property references in MSBuild conditions (violates [MSBuild best practices]((learn.microsoft.com/redacted)

  • src/FSharp.Build/Microsoft.FSharp.NetSdk.targets: $(DisableILLinkSubstitutions), $(AssemblyName) — shipped SDK target
  • src/FSharp.Build/Microsoft.FSharp.Targets: UsingXBuild boolean comparisons — shipped SDK target
  • FSharp.Profiles.props: $(TolerateUnusedBindings)
  • FSharpBuild.Directory.Build.props: $(AdditionalFscCmdFlags)

Testing

These are purely syntactic fixes (adding quotes, fixing a variable name). Full CI validation is deferred to the PR checks. No behavioral change is expected:

  • Quoting both sides of MSBuild conditions is the documented best practice and has identical evaluation semantics for non-pathological property values
  • The DotnetFsiCompilerPath fix corrects a dead-code condition to match the intended behavior

Generated by F# MSBuild File Quality Review Agent · opus46 15.3M ·

- Fix DotnetFsiCompilerPath condition checking wrong variable (DotnetFscCompilerPath
  instead of DotnetFsiCompilerPath) in Microsoft.FSharp.NetSdk.props
- Quote property references in conditions per MSBuild best practices:
  - Microsoft.FSharp.NetSdk.targets: DisableILLinkSubstitutions, AssemblyName
  - Microsoft.FSharp.Targets: UsingXBuild boolean comparisons
  - FSharp.Profiles.props: TolerateUnusedBindings
  - FSharpBuild.Directory.Build.props: AdditionalFscCmdFlags

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-ProjectsAndBuild MSBuild tasks, project files, framework resolution automation

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

0 participants