Home: Packing csproj with long description issues unresolvable warning about missing summary text

Created on 13 Feb 2017  路  14Comments  路  Source: NuGet/Home

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

Pack NeedsTriageDiscussion Bug

Most helpful comment

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?

All 14 comments

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

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

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

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.

will discuss possible options with @rrelyea

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?

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.

@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

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.

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

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

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?

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>

@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!

Was this page helpful?
0 / 5 - 0 ratings