Skip to content

Commit 271de0d

Browse files
wtgodbecaptainsafia
authored andcommitted
Include Readme.md in packages (#57809)
* Include Readme.md in packages * Fix * Try this * Fix syntax * Remove bad ref
1 parent 462f314 commit 271de0d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Directory.Build.props

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,18 @@
242242
<ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
243243
</PropertyGroup>
244244

245+
<PropertyGroup>
246+
<!-- PackageReadmeFile specifies the package readme file name in the package. PackageReadmeFilePath points to the package readme file on disk. -->
247+
<EnableDefaultPackageReadmeFile Condition="'$(EnableDefaultPackageReadmeFile)' == '' and '$(IsShipping)' != 'false'">true</EnableDefaultPackageReadmeFile>
248+
<PackageReadmeFilePath Condition="'$(PackageReadmeFilePath)' == '' and '$(EnableDefaultPackageReadmeFile)' == 'true'">PACKAGE.md</PackageReadmeFilePath>
249+
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' and '$(EnableDefaultPackageReadmeFile)' == 'true' and Exists('$(PackageReadmeFilePath)' )">PACKAGE.md</PackageReadmeFile>
250+
</PropertyGroup>
251+
252+
<!-- Add a package README file -->
253+
<ItemGroup Condition="'$(PackageReadmeFilePath)' != '' and Exists('$(PackageReadmeFilePath)' )">
254+
<None Include="$(PackageReadmeFilePath)" Pack="true" PackagePath="\" />
255+
</ItemGroup>
256+
245257
<PropertyGroup>
246258
<!-- Set the arcade before common targets so we compute ExcludeFromBuild before arcade uses it. -->
247259
<CustomBeforeMicrosoftCommonTargets>$(MSBuildThisFileDirectory)Directory.Build.BeforeCommonTargets.targets</CustomBeforeMicrosoftCommonTargets>

0 commit comments

Comments
 (0)