Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Jul 12, 2023
1 parent 47727fb commit 0a50fef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@
<MicrosoftNetCoreAppFrameworkName>Microsoft.NETCore.App</MicrosoftNetCoreAppFrameworkName>
<NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName>
<NetCoreAppCurrent>net$(NetCoreAppCurrentVersion)</NetCoreAppCurrent>
<!-- Important: Set this to the GA version during servicing when GA packages are available. -->
<ApiCompatNetCoreAppBaselineVersion>7.0</ApiCompatNetCoreAppBaselineVersion>

<!-- The previous supported .NET version. -->
<NetCoreAppPreviousVersion>7.0</NetCoreAppPreviousVersion>
Expand Down Expand Up @@ -114,6 +112,10 @@
<NetFrameworkToolCurrent Condition="'$(DotNetBuildFromSource)' == 'true'" />
<NetFrameworkCurrent Condition="'$(DotNetBuildFromSource)' == 'true'" />

<!-- Important: Set this to the GA version (or a close approximation) during servicing and adjust the TFM property below. -->
<ApiCompatNetCoreAppBaselineVersion>7.0.0</ApiCompatNetCoreAppBaselineVersion>
<ApiCompatNetCoreAppBaselineTFM>net7.0</ApiCompatNetCoreAppBaselineTFM>

<TargetFrameworkForNETFrameworkTasks>$(NetFrameworkToolCurrent)</TargetFrameworkForNETFrameworkTasks>
<!-- Don't build for NETFramework during source-build. -->
<TargetFrameworkForNETFrameworkTasks Condition="'$(DotNetBuildFromSource)' == 'true'" />
Expand Down
2 changes: 1 addition & 1 deletion eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<DisablePackageBaselineValidation Condition="'$(IsShipping)' == 'false' or
'$(SuppressFinalPackageVersion)' == 'true' or
'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$(ApiCompatNetCoreAppBaselineVersion).0</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$(ApiCompatNetCoreAppBaselineVersion)</PackageValidationBaselineVersion>
<BeforePack>$(BeforePack);IncludeAnalyzersInPackage;AddNETStandardCompatErrorFileForPackaging</BeforePack>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludeProjectReferencesWithPackAttributeInPackage</TargetsForTfmSpecificContentInPackage>
<!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
Expand Down
13 changes: 6 additions & 7 deletions src/libraries/apicompat/ApiCompat.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
<ApiCompatNetStandard20BaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.netstandard2.0.xml</ApiCompatNetStandard20BaselineFile>
</PropertyGroup>

<!-- In servicing, the live targeting pack is compared against the GA version in strict mode, without a suppression file. -->
<PropertyGroup Condition="'$(DotNetFinalVersionKind)' == 'servicing' and '$(ApiCompatNetCoreAppBaselineVersion)' == '$(NetCoreAppCurrentVersion)'">
<!-- In servicing, the live targeting pack is compared against the GA version in strict mode. -->
<PropertyGroup Condition="'$(DotNetFinalVersionKind)' == 'servicing'">
<ApiCompatEnableStrictMode>true</ApiCompatEnableStrictMode>
<ApiCompatNetCoreAppLatestStableBaselineFile />
</PropertyGroup>

<ItemGroup>
Expand All @@ -25,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<ApiCompatNetCoreAppLatestStableLeftAssembliesTransformationPattern Include=".+%5C$([System.IO.Path]::DirectorySeparatorChar)(.+)" ReplacementString="net$(ApiCompatNetCoreAppBaselineVersion)/$1" />
<ApiCompatNetCoreAppLatestStableLeftAssembliesTransformationPattern Include=".+%5C$([System.IO.Path]::DirectorySeparatorChar)(.+)" ReplacementString="$(ApiCompatNetCoreAppBaselineTFM)/$1" />
<ApiCompatNetStandard21LeftAssembliesTransformationPattern Include=".+%5C$([System.IO.Path]::DirectorySeparatorChar)(.+)" ReplacementString="netstandard2.1/$1" />
<ApiCompatNetStandard20LeftAssembliesTransformationPattern Include=".+%5C$([System.IO.Path]::DirectorySeparatorChar)(.+)" ReplacementString="netstandard2.0/$1" />
<ApiCompatNetCoreAppCurrentRightAssembliesTransformationPattern Include=".+%5C$([System.IO.Path]::DirectorySeparatorChar)(.+)" ReplacementString="$(NetCoreAppCurrent)/$1" />
Expand All @@ -39,7 +38,7 @@
</ItemGroup>

<ItemGroup>
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(ApiCompatNetCoreAppBaselineVersion).0]" />
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(ApiCompatNetCoreAppBaselineVersion)]" />
<PackageDownload Include="NETStandard.Library.Ref" Version="[$(NETStandardLibraryRefVersion)]" />
<PackageDownload Include="NETStandard.Library" Version="[$(NetStandardLibraryVersion)]" />
<PackageReference Include="Microsoft.DotNet.ApiCompat.Task" Version="$(MicrosoftDotNetApiCompatTaskVersion)" IsImplicitlyDefined="true" />
Expand All @@ -50,7 +49,7 @@
AfterTargets="Build"
Inputs="@(ReferencePathWithRefAssemblies);$(ApiCompatNetStandard20BaselineFile);$(ApiCompatNetStandard21BaselineFile);$(ApiCompatNetCoreAppLatestStableBaselineFile);@(ApiCompatExcludeAttributesFile)"
Outputs="$(IntermediateOutputPath)$(TargetArchitecture)-marker.txt">
<Message Text="ApiCompat -> Comparing $(NetCoreAppCurrent) reference assemblies against netstandard2.x and net$(ApiCompatNetCoreAppBaselineVersion)..." Importance="high" />
<Message Text="ApiCompat -> Comparing $(NetCoreAppCurrent) reference assemblies against .NETStandard 2.x and .NETCoreApp $(ApiCompatNetCoreAppBaselineVersion)..." Importance="high" />

<ItemGroup>
<ApiCompatRightAssembly Include="@(ReferencePathWithRefAssemblies->WithMetadataValue('IsPrivateAssembly', 'false')->WithMetadataValue('OutputItemType', 'SharedFrameworkAssembly'))" />
Expand All @@ -59,7 +58,7 @@

<!-- ApiCompat: NetCoreAppCurrent <-> .NETCoreApp ApiCompatNetCoreAppBaselineVersion -->
<Microsoft.DotNet.ApiCompat.Task.ValidateAssembliesTask
LeftAssemblies="$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.netcore.app.ref', '$(ApiCompatNetCoreAppBaselineVersion).0', 'ref', 'net$(ApiCompatNetCoreAppBaselineVersion)'))"
LeftAssemblies="$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.netcore.app.ref', '$(ApiCompatNetCoreAppBaselineVersion)', 'ref', '$(ApiCompatNetCoreAppBaselineTFM)'))"
RightAssemblies="@(ApiCompatRightAssembly)"
RoslynAssembliesPath="$(RoslynAssembliesPath)"
GenerateSuppressionFile="$(ApiCompatGenerateSuppressionFile)"
Expand Down

0 comments on commit 0a50fef

Please sign in to comment.