You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Packing csproj with long description issues unresolvable warning about missing summary text #4587
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>
Reacted by Paul Harrington, Andrew Arnott, Jon Skeet, Alex Zaytsev, Drew Noakes, bitbonk, Kasey S. Osborn, Michael Estermann, Alex Barney, Frédéric Delaporte and 2 more
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.
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.
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.
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?
Reacted by Jorge Bay, Drew Noakes, Yves Goergen, Nathan Brown, Jared Thirsk, Mertsch, Olivier Spinelli, Kasey S. Osborn, Taylor Southwick, Alex Barney and 5 more
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:
@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!
Activity
rohit21agrawal commentedon Feb 13, 2017
@natemcmaster before we assign a milestone to this, just want to make sure this is not blocking you in any way?
natemcmaster commentedon Feb 13, 2017
Not blocking. It's just a build warning, not an error.
rohit21agrawal commentedon Feb 13, 2017
just an FYI, you can disable these warning by setting the
$(NoPackageAnalysis)property to true.natemcmaster commentedon Feb 13, 2017
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 commentedon Feb 13, 2017
will discuss possible options with @rrelyea
dougbu commentedon Feb 25, 2017
For the MVC repo, would it be possible to make
NoPackageAnalysispart of metadata for theProjectsitem group passed to thePacktask? Then we could turn off these warnings just for the projects that hit them.Or will the warnings be fixed soon?
DavidArno commentedon Mar 13, 2017
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 commentedon 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 commentedon 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 commentedon Mar 24, 2017
@AArnott
<summary>is deprecated for NET Core projects and there are no plans of bringing it back currently.rohit21agrawal commentedon Mar 24, 2017
the fix that we will do to close this bug is going to remove this warning for netcore projects.
RickStrahl commentedon Jun 23, 2017
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?Fixed Description. Giving up about NuGet warning (NuGet/Home#4587).
move assemblyinfo -> csproj, shorten description
kkm000 commentedon 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:
kkm000 commentedon 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:
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!
Retire package Summary Missing analysis rule (#1906)
squash package analysis warnings re: summary text
Squash some warnings (#278)
Squash some warnings (#278)