[DCR]: Improve NU5128 warning text #11354
Labels
Area:ErrorHandling
warnings and errors/log messages & related error codes.
Functionality:Pack
Priority:2
Issues for the current backlog.
Type:DCR
Design Change Request
NuGet Product(s) Affected
NuGet.exe, MSBuild.exe, dotnet.exe
Current Behavior
Customer reported the following:
The solution was even simpler:
Anyway, since you planned not to "fix" this, it would be nicer to add to the warning message that it can be safely ignored when packaging an analyzer.
I created a C# code generator which is effectively an analyzer, so there is no binary to "deploy".
Upon compiling with pack, NuGet complains with those two warnings:
warning NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
warning NU5128: - Add lib or ref assemblies for the netstandard2.0 target framework
I read these are well-known false positives in analyzer projects.
Anyway, they are annoying. Does anyone know how can I get rid of them? I am trying not to take any drastic action like "-NoPackageAnalysis"
Note: I am have no "nuspec" but all the nuget info are inside the csproj.
Desired Behavior
Add additional text to the warning message indicating this can be suppressed while packing a analyzer.
Additional Context
No response
The text was updated successfully, but these errors were encountered: