Skip to content

Commit

Permalink
Suppress TFM Build Warnings (#3210)
Browse files Browse the repository at this point in the history
* suppress tfm build warnings

* add suppression to other dir.build.props files as the setting is not propagating from the top level .props

* found another

* suppress tfm build warnings for just .net 6 and .net 7
  • Loading branch information
kllysng authored Jan 22, 2025
1 parent 8c68af6 commit 95b1f8d
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'NET6_0_OR_GREATER'">
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
Expand Down
5 changes: 5 additions & 0 deletions benchmark/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<PropertyGroup Label="Common dependency versions">
<MicrosoftIdentityLabApiVersion>1.0.0</MicrosoftIdentityLabApiVersion>
<BenchmarkDotNetVersion>0.13.12</BenchmarkDotNetVersion>
Expand Down
5 changes: 5 additions & 0 deletions tests/DevApps/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<LangVersion>13</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<!--CVE-2021-24112 from ASpNetCore.Protection, and Redis-->
<SystemDrawingCommon>6.0.0</SystemDrawingCommon>
Expand Down
5 changes: 5 additions & 0 deletions tests/DevApps/aspnet-mvc/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
<PropertyGroup>
<LangVersion>13</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
</Project>
5 changes: 5 additions & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<PropertyGroup Label="Common dependency versions">
<MicrosoftAspNetCoreMvcTestingVersion>7.0.0</MicrosoftAspNetCoreMvcTestingVersion>
<MicrosoftNetTestSdkVersion>17.11.1</MicrosoftNetTestSdkVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
<Project></Project>
<Project>
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
</Project>
5 changes: 5 additions & 0 deletions tools/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
<!--RS0016: Add public types and members to the declared API-->
<NoWarn>RS0016</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
</Project>
5 changes: 5 additions & 0 deletions tools/app-provisioning-tool/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<RootNamespace>Microsoft.Identity.App</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net7.0'">
<!-- Suppress the "Microsoft.Bcl.Memory 9.0.0 doesn't support net6.0/net7.0 and has not been tested with it" warning -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
<None Remove="..\..\LICENSE"/>
</ItemGroup>
Expand Down

0 comments on commit 95b1f8d

Please sign in to comment.