Skip to content

Commit e476d9d

Browse files
authored
Include Readme.md in packages (#57809)
* Include Readme.md in packages * Fix * Try this * Fix syntax * Remove bad ref
1 parent fc4f881 commit e476d9d

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
@@ -239,6 +239,18 @@
239239
<ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
240240
</PropertyGroup>
241241

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

0 commit comments

Comments
 (0)