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

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

Open
nils-a opened this issue Mar 3, 2024 Discussed in #4293 · 1 comment
Open

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

nils-a opened this issue Mar 3, 2024 Discussed in #4293 · 1 comment

Comments

@nils-a
Copy link
Member

nils-a commented Mar 3, 2024

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

Target framework:

   <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>

Description value is not appeared in the package metadata even if I manually add Description property to the .csproj file like:

   <Description>asd</Description>

This question is continuation of the discussion from here . It looks like Description even in theory can't be filled in this case? If so, why Description field does exist?

@nils-a
Copy link
Member Author

nils-a commented Mar 3, 2024

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.

  • We should make this more clear in the docs.
  • Some properties could probably be set in some other way. (Like the Description property could most likely be set by adding it to the msbuild properties.)
  • Properties that are set, but are not used in one of the use cases could produce a warning so that it is more obvious that this property is set but not being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant