Skip to content

Commit

Permalink
Fix condition for adding package readmes
Browse files Browse the repository at this point in the history
Fixes #106585

The EnableDefualtPackageReadmeFile property needs to be defined before packaging.targets is imported.
  • Loading branch information
ViktorHofer authored and github-actions committed Aug 18, 2024
1 parent 63c9565 commit b014cdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<TestStrongNameKeyId Condition="'$(TestStrongNameKeyId)' == '' and $(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">MicrosoftAspNetCore</TestStrongNameKeyId>
<TestStrongNameKeyId Condition="'$(TestStrongNameKeyId)' == ''">Open</TestStrongNameKeyId>
<StrongNameKeyId Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true'">$(TestStrongNameKeyId)</StrongNameKeyId>

<!-- Make libraries packages use and require a package readme file. -->
<EnableDefaultPackageReadmeFile Condition="'$(EnableDefaultPackageReadmeFile)' == '' and '$(IsShipping)' == 'true'">true</EnableDefaultPackageReadmeFile>
</PropertyGroup>

<!-- resources.targets need to be imported before the Arcade SDK. -->
Expand Down Expand Up @@ -121,14 +124,11 @@
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" />

<PropertyGroup>
<!-- Libraries ref and source projects which don't bring in dependencies from outside the repository shouldn't reference compat shims. -->
<!-- Libraries ref and source projects which don't bring in dependencies from outside the repository shouldn't reference compat shims. -->
<SkipTargetingPackShimReferences Condition="'$(UseLocalTargetingRuntimePack)' == 'true' and
'$(IsTestProject)' != 'true' and
'$(IsTestSupportProject)' != 'true' and
'$(IsGeneratorProject)' != 'true'">true</SkipTargetingPackShimReferences>

<!-- Make libraries packages use and require a package readme file. -->
<EnableDefaultPackageReadmeFile Condition="'$(EnableDefaultPackageReadmeFile)' == '' and '$(IsShipping)' == 'true'">true</EnableDefaultPackageReadmeFile>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
Expand Down

0 comments on commit b014cdb

Please sign in to comment.