[Repo Assist] eng: suppress NETSDK1212 warnings by conditioning IsTrimmable on net6.0+#1773
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Silences the
NETSDK1212build warning that has appeared in every CI run: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 targetnetstandard2.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:
This is a no-op for the current
netstandard2.0targets (condition evaluates tofalse, IsTrimmable not set, no warning), and will correctly enable trimming if/when net6.0+ targets are added (e.g., via a future PR addingnet8.0).Test Status
check-formatpassesnetstandard2.0targets