NuGet/Home

Be smarter about PackagePath and Pack metadata values

クローズ

#10,830 opened on 2021/05/05

 (3 件のコメント) (1 件のリアクション) (0 人の担当者)HTML (292 件のフォーク)batch import
Functionality:PackIcebox cleanup candidatePriority:3Status:InactiveType:DCRhelp wanted

Repository metrics

Stars
 (1,459 個のスター)
PR merge metrics
 (平均マージ 464d 23h) (30d で 1 merged PR)

説明

See the documentation on adding package readme support, it states you need to add:

<PropertyGroup>
    ...
    <PackageReadmeFile>readme.md</PackageReadmeFile>
    ...
</PropertyGroup>

<ItemGroup>
    ...
    <None Include="docs\readme.md" Pack="true" PackagePath="\"/>
    ...
</ItemGroup>

Now, the PackagePath metadata is a packing-specific metadata item that is not used anywhere else (AFAIK). It seems quite obvious that if I specify a PackagePath metadata, it's because I want the item packed. Specifying also Pack=true seems entirely unnecessary and redundant.

So, the proposal is:

Whenever PackagePath is specified in any item (of the supported candidates), asume Pack=true for the item.

(this is what nugetizer does too, btw, it's more natural and less surprises).

コントリビューターガイド