Skip to content

[Repo Assist] eng: suppress NETSDK1212 warnings by conditioning IsTrimmable on net6.0+#1773

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/eng-fix-netsdk1212-trimmable-2026-05-03-a7bb74b711e43652
Draft

[Repo Assist] eng: suppress NETSDK1212 warnings by conditioning IsTrimmable on net6.0+#1773
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/eng-fix-netsdk1212-trimmable-2026-05-03-a7bb74b711e43652

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 3, 2026

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Silences the NETSDK1212 build warning that has appeared in every CI run:

warning NETSDK1212: IsTrimmable and EnableTrimAnalyzer are not supported for the
target framework. Consider multi-targeting to a supported framework to enable
trimming, and set IsTrimmable only for the supported frameworks.

Root Cause

Seven project files (FSharp.Data.Csv.Core, FSharp.Data.Html.Core, FSharp.Data.Http, FSharp.Data.Json.Core, FSharp.Data.Runtime.Utilities, FSharp.Data.WorldBank.Core, FSharp.Data.Xml.Core) set <IsTrimmable>true</IsTrimmable> unconditionally. These projects currently target netstandard2.0, for which trimming is not supported. MSBuild therefore emits NETSDK1212 for each project on every build.

Fix

Add the MSBuild condition suggested by the warning itself:

<!-- Before -->
<IsTrimmable>true</IsTrimmable>

<!-- After -->
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>

This is a no-op for the current netstandard2.0 targets (condition evaluates to false, IsTrimmable not set, no warning), and will correctly enable trimming if/when net6.0+ targets are added (e.g., via a future PR adding net8.0).

Test Status

  • ✅ All tests pass: 3005 + 489 + 292 + 26 + 2 = 3814 passed, 0 failed
  • check-format passes
  • ✅ NETSDK1212 warnings no longer emitted for netstandard2.0 targets

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

The <IsTrimmable> property is only meaningful for net6.0+ TFMs;
applying it unconditionally to netstandard2.0 targets produces
NETSDK1212 build warnings in every CI run. Add an MSBuild condition
so IsTrimmable is only set when the target framework is compatible
with net6.0.

Affected projects:
  FSharp.Data.Csv.Core, FSharp.Data.Html.Core, FSharp.Data.Http,
  FSharp.Data.Json.Core, FSharp.Data.Runtime.Utilities,
  FSharp.Data.WorldBank.Core, FSharp.Data.Xml.Core

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants