Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
natemcmaster opened this issue Feb 13, 2017 · 14 comments

Comments

@natemcmaster
Copy link

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

@rohit21agrawal
Copy link
Contributor

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

@natemcmaster
Copy link
Author

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

@rohit21agrawal
Copy link
Contributor

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

@natemcmaster
Copy link
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.

@rohit21agrawal
Copy link
Contributor

will discuss possible options with @rrelyea

@dougbu
Copy link

dougbu commented Feb 25, 2017

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?

@DavidArno
Copy link

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.

@rohit21agrawal rohit21agrawal added this to the 4.3 milestone Mar 23, 2017
@rohit21agrawal
Copy link
Contributor

rohit21agrawal commented Mar 23, 2017

@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

@AArnott
Copy link
Contributor

AArnott commented Mar 23, 2017

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.

@rohit21agrawal
Copy link
Contributor

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

@rohit21agrawal
Copy link
Contributor

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

@RickStrahl
Copy link

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?

@rohit21agrawal rohit21agrawal mentioned this issue Aug 10, 2017
17 tasks
olivier-spinelli added a commit to Invenietis/CK-ActivityMonitor that referenced this issue Sep 13, 2017
@emgarten emgarten removed this from the 4.4 milestone Nov 9, 2017
@emgarten emgarten added this to the Backlog milestone Nov 9, 2017
jasonchester pushed a commit to jasonchester/SpectoLogic.Azure.CosmosDB.Graph that referenced this issue Nov 27, 2017
long description produced warnings when running dotnet pack
NuGet/Home#4587
@kkm000
Copy link

kkm000 commented Dec 3, 2017

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>

@kkm000
Copy link

kkm000 commented Dec 3, 2017

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

rohit21agrawal pushed a commit to NuGet/NuGet.Client that referenced this issue Dec 27, 2017
simonjefford pushed a commit to simonjefford/Ocelot that referenced this issue Mar 16, 2018
It's not actually possible to provide a summary right now as per
NuGet/Home#4587
TomPallister pushed a commit to ThreeMammals/Ocelot that referenced this issue Mar 16, 2018
* squash SA1649 warnings (file/type name mismatch)

* squash SA1127 warnings (generic constraint on own line)

* squash SA1507 warnings (multiple blank lines)

* squash package analysis warnings re: summary text

It's not actually possible to provide a summary right now as per
NuGet/Home#4587

* squash missing castle.core reference warning

* squash obsolete method warnings re: AddOcelotBaseUrl
ematlock0418 pushed a commit to ematlock0418/Ocelot that referenced this issue Mar 21, 2021
* squash SA1649 warnings (file/type name mismatch)

* squash SA1127 warnings (generic constraint on own line)

* squash SA1507 warnings (multiple blank lines)

* squash package analysis warnings re: summary text

It's not actually possible to provide a summary right now as per
NuGet/Home#4587

* squash missing castle.core reference warning

* squash obsolete method warnings re: AddOcelotBaseUrl
KatherineGirona added a commit to KatherineGirona/Ocelot that referenced this issue Oct 11, 2022
* squash SA1649 warnings (file/type name mismatch)

* squash SA1127 warnings (generic constraint on own line)

* squash SA1507 warnings (multiple blank lines)

* squash package analysis warnings re: summary text

It's not actually possible to provide a summary right now as per
NuGet/Home#4587

* squash missing castle.core reference warning

* squash obsolete method warnings re: AddOcelotBaseUrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants