[msbuild-quality] MSBuild File Quality Report — F# SDK build logic
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- fsharp
- Domain
- build-system
Research direction
Start by reading src/FSharp.Build/Microsoft.FSharp.Targets around CoreCompileDependsOn and CreateManifestResourceNames, then inspect Microsoft.FSharp.NetSdk.targets around GenerateFSharpILLinkSubstitutions. Review the shim props and targets for the property-name and import-guard findings, and compare the established FileWrites pattern. Done means each finding is either safely corrected or documented with its intended behavior verified.
Written by the indexing model from the issue text.
Description
🔧 MSBuild File Quality Report
Scope: Category-1 shipped F# SDK build logic (src/FSharp.Build/, src/fsc/, src/fsi/) and the vsintegration/shims/ — the files imported by every F# project.
Files reviewed: 13
Findings: 🔴 0 errors · 🟡 2 warnings · 🔵 3 suggestions
🟡 Warnings
src/FSharp.Build/Microsoft.FSharp.Targets
- Rule A-1 (DependsOn chain overwrite):
CoreCompileDependsOnis assigned without preserving its prior value.- Line: ~224
- Current:
<CoreCompileDependsOn>_ComputeNonExistentFileProperty</CoreCompileDependsOn> - Suggested:
<CoreCompileDependsOn>$(CoreCompileDependsOn);_ComputeNonExistentFileProperty</CoreCompileDependsOn> - Note: F# defines its own
CoreCompile(DependsOnTargets="$(CoreCompileDependsOn);FSharpSourceCodeCompileOrder"), so any contributions other SDK/props files appended toCoreCompileDependsOnbefore this line are silently dropped. If this blanking is deliberate (F# fully ownsCoreCompile), a short comment explaining why would prevent future regressions. Verify against the SDK before changing — ordering-sensitive.
src/FSharp.Build/Microsoft.FSharp.NetSdk.targets
- Rule A-4 (missing FileWrites registration): The
GenerateFSharpILLinkSubstitutionstarget generatesILLink.Substitutions.xmlinto$(IntermediateOutputPath)and registers it asEmbeddedResource, but not as@(FileWrites).- Line: ~213–219
- Current: only
<Output TaskParameter="GeneratedItems" ItemName="EmbeddedResource" /> - Suggested: also emit the generated file to
@(FileWrites)sodotnet cleanremoves it. - Note: The sibling target
GenerateFSharpTextResources(inMicrosoft.FSharp.Targets) correctly registers its generated.fs/.resxoutputs in@(FileWrites); this target is inconsistent with that established pattern.
🔵 Suggestions
src/FSharp.Build/Microsoft.FSharp.Targets
- Rule A-1:
<CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>(~line 123) explicitly blanks the property. This mirrors the C#/VB targets and is likely intentional (F# overridesCreateManifestResourceNameswholesale), but an explanatory comment would make the intent clear.
vsintegration/shims/Microsoft.FSharp.ShimHelpers.props
- Property-name mismatch: the fallback branch (~line 37) sets
<_FSCorePackageVersionSet>true</_FSCorePackageVersionSet>(leading underscore), whereas the guard property consumed byMicrosoft.FSharp.Core.NetSdk.propsisFSCorePackageVersionSet(no underscore). The underscore-prefixed property appears to be read by nothing, so the write looks dead. Confirm the intended name.
vsintegration/shims/*.targets / *.props
- Rule D-1 (Exists() guard on optional imports): The shim imports guarded only by
'$(FSharpCompilerPath)' != ''(e.g.Microsoft.FSharp.NetSdk.Shim.propslines 4–5,Microsoft.FSharp.Shim.targetsline 4) have noExists('...')guard. IfFSharpCompilerPathis set but the target file is absent, the build fails with a cryptic missing-import error rather than falling back. These are Windows/VS-only shims where the path is expected to exist, so impact is low — consider addingand Exists('...')for a clearer failure mode.
Files reviewed (no issues found)
src/FSharp.Build/Microsoft.FSharp.NetSdk.props— correct semicolon composition (DefineConstants,WarningsAsErrors), guarded defaults,EnsureTrailingSlashusagesrc/FSharp.Build/Microsoft.FSharp.Core.NetSdk.props— clean guarded version propertysrc/FSharp.Build/Microsoft.FSharp.Overrides.NetSdk.targets—CoreGenerateAssemblyInfocorrectly declaresInputs/Outputsand registersFileWritessrc/FSharp.Build/Microsoft.Portable.FSharp.Targets— correctExists()-guarded, case-sensitivity-aware importssrc/fsc/fsc.targets,src/fsi/fsi.targets— project files; correct$(NoWarn)/$(DefineConstants)compositionvsintegration/shims/Microsoft.FSharp.Overrides.NetSdk.Shim.targets,Microsoft.Portable.FSharp.Shim.targets
Review Rules Reference
- Target authoring: DependsOn chains, Returns vs Outputs, incremental build, FileWrites
- Property patterns: conditional defaults, quoted conditions, semicolon composition, path normalization
- Item management: Include/Update, batching, generated-file placement
- Extension points: import guards, CustomBefore/After hooks, cross-platform paths
Generated by MSBuild Quality Review
Generated by F# MSBuild File Quality Review Agent · opus48 1M · ◷
- Dominant language
- F#
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fsprojects/fsharp-automation
-
[aw] Detection Runs Openagentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 5/100
fsprojects/fsharp-automation#3 · 723 comments ·
-
automation repo-assist
Difficulty 1/5 Under an hour Newbie friendliness 15/100
fsprojects/fsharp-automation#2 · 1 comment ·
-
automation repo-assist
Difficulty 1/5 Under an hour Newbie friendliness 10/100
All issues in fsprojects/fsharp-automation
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
elementary/flatpak-platform#253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/hone-maven-plugin#1060 ·
-
0.kind: build failure
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Update Vish to 1.1.5 Openpackage-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comment ·