Unnamed
Unnamed

Reputation: 180

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

I 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 nguet package and set expected version, but the description value is ignored. This is what I still see in ClassLibrary1.2.0.0.nupkg:

enter image description here

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>

Upvotes: 0

Views: 67

Answers (1)

Nils
Nils

Reputation: 9941

The short answer 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.

The documentation (and maybe a warning during runtime) should probably make this more obvious.

Upvotes: 0

Related Questions