Skip to content

Packing csproj with long description issues unresolvable warning about missing summary text #4587

Closed

Description

@natemcmaster

Packing a csproj with a long <Description> value issues the following warnings:

NuGet.Build.Tasks.Pack.targets(104,5): warning : Issue found with package 'Microsoft.Extensions.Configuration.Abstractions'. [C:\dev\Universe\Configuration\src\Microsoft.Extensions.Configuration.Abstractions\Microsoft.Extensions.Configuration.Abstractions.csproj]
NuGet.Build.Tasks.Pack.targets(104,5): warning : Issue: Consider providing Summary text. [C:\dev\Universe\Configuration\src\Microsoft.Extensions.Configuration.Abstractions\Microsoft.Extensions.Configuration.Abstractions.csproj]
NuGet.Build.Tasks.Pack.targets(104,5): warning : Description: The Description text is long but the Summary text is empty. This means the Description text will be truncated in the 'Manage NuGet Packages' dialog. [C:\dev\Universe\Configuration\src\Microsoft.Extensions.Configuration.Abstractions\Microsoft.Extensions.Configuration.Abstractions.csproj]
NuGet.Build.Tasks.Pack.targets(104,5): warning : Solution: Provide a brief summary of the package in the Summary field. [C:\dev\Universe\Configuration\src\Microsoft.Extensions.Configuration.Abstractions\Microsoft.Extensions.Configuration.Abstractions.csproj]

However, specifying a Summary field is not possible from csproj.

Repro

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <Summary>Abstractions of key-value pair based configuration.</Summary>
    <Description>$(Summary)

Commonly used types:
Microsoft.Extensions.Configuration.IConfiguration
Microsoft.Extensions.Configuration.IConfigurationBuilder
Microsoft.Extensions.Configuration.IConfigurationProvider
Microsoft.Extensions.Configuration.IConfigurationRoot
Microsoft.Extensions.Configuration.IConfigurationSection</Description>
    <TargetFramework>netstandard1.0</TargetFramework>
    <PackageTags>configuration</PackageTags>
  </PropertyGroup>

</Project>

Details
Using NuGet/Microsoft.NET.Sdk RC4

cc @rohit21agrawal

Activity

  1. rohit21agrawal commented on Feb 13, 2017

    @rohit21agrawal
    Contributor

    @natemcmaster before we assign a milestone to this, just want to make sure this is not blocking you in any way?

  2. natemcmaster commented on Feb 13, 2017

    @natemcmaster
    Author

    Not blocking. It's just a build warning, not an error.

  3. rohit21agrawal commented on Feb 13, 2017

    @rohit21agrawal
    Contributor

    just an FYI, you can disable these warning by setting the $(NoPackageAnalysis) property to true.

  4. natemcmaster commented on Feb 13, 2017

    @natemcmaster
    Author

    Yeah we found that setting. We want to keep it enabled though just in case there are other package issues. Would be cool if we could turn off certain NuGet warnings but not all, but that would be a much bigger feature.

  5. rohit21agrawal commented on Feb 13, 2017

    @rohit21agrawal
    Contributor

    will discuss possible options with @rrelyea

  6. dougbu commented on Feb 25, 2017

    @dougbu

    For the MVC repo, would it be possible to make NoPackageAnalysis part of metadata for the Projects item group passed to the Pack task? Then we could turn off these warnings just for the projects that hit them.

    Or will the warnings be fixed soon?

  7. DavidArno commented on Mar 13, 2017

    @DavidArno

    Is there a work-around to this issue until support of the summary field is added to csproj? Just ignoring the warning and having a truncated summary seems more than a little messy.

  8. added this to the 4.3 milestone on Mar 23, 2017
  9. rohit21agrawal commented on Mar 23, 2017

    @rohit21agrawal
    Contributor

    @DavidArno understand that Description is not actually truncated in the nuspec file. It's only in the Visual Studio UI where the Description is too long it collapses it to fit the space, but a user can however click on ReadMore to read the rest of the Description

  10. AArnott commented on Mar 23, 2017

    @AArnott
    Contributor

    I believe I heard somewhere that <summary> was getting deprecated. Is this why PackTask doesn't take it, or is it a legit bug that we can expect to be fixed? We'd like a short and a long form string so we can make the most of each one.

  11. rohit21agrawal commented on Mar 24, 2017

    @rohit21agrawal
    Contributor

    @AArnott <summary> is deprecated for NET Core projects and there are no plans of bringing it back currently.

  12. rohit21agrawal commented on Mar 24, 2017

    @rohit21agrawal
    Contributor

    the fix that we will do to close this bug is going to remove this warning for netcore projects.

  13. modified the milestones: 4.4, 4.3 on Jun 14, 2017
  14. RickStrahl commented on Jun 23, 2017

    @RickStrahl

    Can somebody comment here on what is supposed to go into NuGet. If NuGet has a <summary> tag (as it does currently unless that's also getting removed) then shouldn't the .csproj NuGet Target support it as well?

  15. modified the milestones: 4.4, Backlog on Nov 9, 2017
  16. kkm000 commented on Dec 3, 2017

    @kkm000

    The current solution is to disable package analysis. Do not shorten the description only for the sake of shortening it! Add this property to the project:

        <NoPackageAnalysis>true</NoPackageAnalysis>
  17. kkm000 commented on Dec 3, 2017

    @kkm000

    @rohit21agrawal, @natemcmaster: I suggest this issue be given more priority. the problem is a warning is generated during build, as of VS15.4.5 RTM:

    1>C:\Program Files\dotnet\sdk\2.0.3\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(204,5): warning : Issue found with package 'Protobuf.MSBuild'.
    1>C:\Program Files\dotnet\sdk\2.0.3\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(204,5): warning : Issue: Consider providing Summary text.
    1>C:\Program Files\dotnet\sdk\2.0.3\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(204,5): warning : Description: The Description text is long but the Summary text is empty. This means the Description text will be truncated in the 'Manage NuGet Packages' dialog.
    1>C:\Program Files\dotnet\sdk\2.0.3\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(204,5): warning : Solution: Provide a brief summary of the package in the Summary field.
    

    Many links from this issue point to the developers trying to shorten the description of the package in their commits, and this is not a good thing (arguably it might be, but no shorter than necessary :)).

    The workaround is of course to disable package analysis; if it's possible to make the workaround more visible interim, that would be even better!

  18. added a commit that references this issue on Mar 16, 2018
  19. added a commit that references this issue on Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions