Skip to content

Commit 01e9fdd

Browse files
authored
[release/7.0] Target only net7.0 during source-build (#75168)
* Target net7.0 in additional projects * Update compatibility suppressions * Only target net7.0 for source-build * Revert "Update compatibility suppressions" This reverts commit 2975185. * Disable package validation for source-build * Revert compatibility suppression changes * Use NetCoreAppCurrent instead of hardcoding net7.0 * Revert mono Apple TFM change * Remove unnecessary LangVersion
1 parent 8f18a0d commit 01e9fdd

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName>
5555
<NetCoreAppCurrent>net$(NetCoreAppCurrentVersion)</NetCoreAppCurrent>
5656
<NetCoreAppMinimum>net6.0</NetCoreAppMinimum>
57+
<NetCoreAppMinimum Condition="'$(DotNetBuildFromSource)' == 'true'">$(NetCoreAppCurrent)</NetCoreAppMinimum>
5758

5859
<NetCoreAppToolCurrentVersion>7.0</NetCoreAppToolCurrentVersion>
5960
<NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>

eng/SourceBuild.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<InnerBuildArgs>$(InnerBuildArgs) /p:PortableBuild=$(SourceBuildPortable)</InnerBuildArgs>
4040
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
4141
<InnerBuildArgs>$(InnerBuildArgs) /p:EnableNgenOptimization=false</InnerBuildArgs>
42+
<InnerBuildArgs>$(InnerBuildArgs) /p:EnablePackageValidation=false</InnerBuildArgs>
4243
</PropertyGroup>
4344
</Target>
4445

src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<NoWarn>$(NoWarn);SA1205;CA1845</NoWarn>
77
<EnableTrimAnalyzer Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">false</EnableTrimAnalyzer>
88
<IsPackable>true</IsPackable>
9-
<!-- Lifetime rules introduced in C# 11 impact scenarios in net6 framework -->
10-
<LangVersion Condition="'$(TargetFramework)' == 'net6.0'">10</LangVersion>
119
<EnableAOTAnalyzer>true</EnableAOTAnalyzer>
1210
<PackageDescription>Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)
1311

src/libraries/System.Text.RegularExpressions/tools/GenerateRegexCasingTable.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
66
<LangVersion>latest</LangVersion>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>

0 commit comments

Comments
 (0)