Skip to content

Commit b95ed0d

Browse files
committed
Always suppress references expressed only in *.nuspec files
- needed even in servicing builds
1 parent 8fb93bd commit b95ed0d

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

eng/targets/ResolveReferences.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@
157157
<UnusedBaselinePackageReference Include="@(BaselinePackageReference)"
158158
Exclude="@(Reference);@(_ProjectReferenceByAssemblyName);@(PackageReference)" />
159159

160-
<!-- Only allow suppressing baseline changes in non-servicing builds. -->
160+
<!-- Handle suppressions needed because above Exclude is not aware of references added in .nuspec files. -->
161+
<UnusedBaselinePackageReference Remove="@(SuppressBaselineReference->WithMetadataValue('InNuspecFile', 'true'))"
162+
Condition=" '$(IsServicingBuild)' == 'true' " />
163+
164+
<!-- Allow suppressions of any baseline changes in non-servicing builds. -->
161165
<UnusedBaselinePackageReference Remove="@(SuppressBaselineReference)"
162166
Condition=" '$(IsServicingBuild)' != 'true' " />
163167

src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,19 @@
2222
<Reference Include="System.Buffers" />
2323
</ItemGroup>
2424

25-
<!-- These references were removed in 3.0 -->
25+
<!--
26+
These references exist only in the .nuspec files and baseline checks are not aware of them. Keep suppressions
27+
in sync with the two .nuspec files:
28+
- Anytime a reference is added to this project file, remove its suppression.
29+
- Remove InNuspecFile attributes of references removed from the .nuspec files. Make suppression conditional on
30+
Major.Minor during previews. After RTM (and baseline updates), remove suppressions entirely.
31+
-->
2632
<ItemGroup>
27-
<SuppressBaselineReference Include="Microsoft.AspNetCore.Components.Analyzers" />
28-
<SuppressBaselineReference Include="Microsoft.AspNetCore.Authorization" />
29-
<SuppressBaselineReference Include="Microsoft.JSInterop" />
30-
<SuppressBaselineReference Include="System.ComponentModel.Annotations" />
33+
<SuppressBaselineReference Include="Microsoft.AspNetCore.Components.Analyzers" InNuspecFile="true" />
34+
<SuppressBaselineReference Include="Microsoft.AspNetCore.Authorization" InNuspecFile="true" />
35+
<SuppressBaselineReference Include="Microsoft.JSInterop" InNuspecFile="true" />
36+
<SuppressBaselineReference Include="System.ComponentModel.Annotations" InNuspecFile="true"
37+
Condition=" '$(TargetFramework)'=='netstandard2.0' " />
3138
</ItemGroup>
3239

3340
<Target Name="_GetNuspecDependencyPackageVersions">

0 commit comments

Comments
 (0)