Skip to content

GH3517: Add NuGet Pack ReadMe Support#3518

Closed
devlead wants to merge 1 commit intocake-build:developfrom
devlead:feature/gh-3517
Closed

GH3517: Add NuGet Pack ReadMe Support#3518
devlead wants to merge 1 commit intocake-build:developfrom
devlead:feature/gh-3517

Conversation

@devlead
Copy link
Member

@devlead devlead commented Oct 5, 2021

Fixes #3517

Copy link
Member

@augustoproiete augustoproiete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments. Am I missing any docs convention that is documented somewhere?

public bool OutputToToolFolder { get; set; }

/// <summary>
/// Gets or sets Path to markdown Markdown (.md) file containing package readme packed into docs folder.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Gets or sets Path to markdown Markdown (.md) file containing package readme packed into docs folder.
/// Gets or sets Path to markdown Markdown (.md) file containing package readme.

AFAIK there's no requirement for the README to be in a docs folder - it can be anywhere in the package. Most of the examples I see have the README.md file at the root of the package

{ "tags", x => ToSpaceSeparatedString(settings.Tags) },
{ "serviceable", x => ToString(settings.Serviceable) }
{ "serviceable", x => ToString(settings.Serviceable) },
{ "readme", x => settings.ReadMePath is { } readme ? string.Concat("docs\\", readme.GetFilename().FullPath) : null },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ "readme", x => settings.ReadMePath is { } readme ? string.Concat("docs\\", readme.GetFilename().FullPath) : null },
{ "readme", x => settings.ReadMePath is { } readme ? readme.GetFilename().FullPath : null },

Same as above: AFAIK there's no requirement for the README to be in a docs folder - it can be anywhere in the package. Most of the examples I see have the README.md file at the root of the package

{
var fileElement = document.CreateAndAppendElement(filesElement, "file");
fileElement.AddAttributeIfSpecified(settings.ReadMePath.FullPath, "src");
fileElement.AddAttributeIfSpecified("docs", "target");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: AFAIK there's no requirement for the README to be in a docs folder - it can be anywhere in the package. Most of the examples I see have the README.md file at the root of the package


if (hasReadMe)
{
var fileElement = document.CreateAndAppendElement(filesElement, "file");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't actually run this to test, but I'm under the impression the README could already be present in the list of files - wouldn't this duplicate the entry in the nuspec?

@devlead devlead closed this Oct 17, 2021
This was referenced Mar 2, 2026
This was referenced Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NuGet Pack Should support new readme file

2 participants