cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.92k stars 731 forks source link

Cake.Build doesn't generate description for nuget and non-sdk projecs #4295

Open nils-a opened 9 months ago

nils-a commented 9 months ago

Discussed in https://github.com/orgs/cake-build/discussions/4293

Originally posted by **DmitryLukyanov** February 29, 2024 have quite simple nuget package creating logic with cake.build: var nugetSettings = new NuGetPackSettings { OutputDirectory = "%some_path%", Verbosity = NuGetVerbosity.Detailed, Description = "oops, description", Version = "2.0.0" }; context.NuGetPack("%project_path%", nugetSettings); It generates nuget package and set expected version, but the description value is ignored. This is what I still see in ClassLibrary1.2.0.0.nupkg: ![image](https://github.com/cake-build/cake/assets/44870738/5da461eb-aa04-497e-a705-89a0fb03d2a6) Target framework: v4.5.2 Description value is not appeared in the package metadata even if I manually add Description property to the .csproj file like: asd This question is continuation of the discussion from [here ](https://stackoverflow.com/questions/78077589/cake-build-doesnt-generate-description-for-nuget-and-non-sdk-projecs?noredirect=1#comment137649844_78077589). It looks like Description even in theory can't be filled in this case? If so, why Description field does exist?
nils-a commented 9 months ago

The fact here, is that NuGetPack (like nuget.exe) has two very distinct usages: One operating on a project file and one operating on a .nuspec file and not all settings that are available in the NuGetPackSettings are used for both usages.