Skip to content

Commit 8f023a7

Browse files
author
Claude (Initial Force WPF Bot)
committed
fix(packaging): add PackageReadmeFile to RuntimeOverride for snupkg
NU5017 'Cannot create a package that has no dependencies nor content' fired during dotnet pack because the snupkg has only loose .pdb files under runtimes/ — the symbol packager doesn't count those as content. The .nupkg packs fine (it has the runtime DLLs). To make snupkg succeed, add a PackageReadmeFile pointing at the existing README.md and Pack the file. This also resolves the secondary 'package is missing a readme' NuGet best-practice warning. InitialForce.WPF.csproj already does this; alignment now matches.
1 parent 6cfde07 commit 8f023a7

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packaging/InitialForce.WPF.RuntimeOverride/InitialForce.WPF.RuntimeOverride.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,17 @@
3131
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3232
<!-- Suppress warnings for NoBuild SDK-style packaging. -->
3333
<NoWarn>NU5128</NoWarn>
34+
<!-- Required so dotnet pack does not emit NU5017 for the snupkg
35+
(a symbol package needs at least one piece of content; loose
36+
PDBs alone in runtimes/ are not counted). -->
37+
<PackageReadmeFile>README.md</PackageReadmeFile>
3438
</PropertyGroup>
3539

40+
<!-- Pack the README. -->
41+
<ItemGroup>
42+
<None Include="README.md" Pack="true" PackagePath="README.md" />
43+
</ItemGroup>
44+
3645
<!-- Empty placeholder assembly: makes the package referenceable in projects
3746
that check for compile-time assets. The real DLLs are under runtimes/. -->
3847
<ItemGroup>

0 commit comments

Comments
 (0)