Skip to content

Commit

Permalink
Automatically include a README.md from the project directory
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Jun 28, 2023
1 parent 88e7018 commit b0f343d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<Project>
<!-- Include and reference README in nuge package, if a README is in the project directory. -->
<PropertyGroup>
<PackageReadmeFile Condition="Exists('README.md')">README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Condition="Exists('README.md')" Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
</Project>
4 changes: 0 additions & 4 deletions src/Library/Library.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="$(RepoRootPath)README.md" Pack="true" PackagePath="" />
</ItemGroup>
</Project>

0 comments on commit b0f343d

Please sign in to comment.