public void Pack() { NuGetArtifactType nugetInfo = _globalInfo.ArtifactTypes.OfType <NuGetArtifactType>().Single(); DotNetCorePackSettings settings = new DotNetCorePackSettings().AddVersionArguments(_globalInfo.GitInfo, c => { c.NoBuild = true; c.IncludeSymbols = true; c.Configuration = _globalInfo.BuildConfiguration; c.OutputDirectory = _globalInfo.ReleasesFolder.Path; }); foreach (NuGetArtifactType.NuGetArtifact p in nugetInfo.GetNuGetArtifacts()) { _globalInfo.Cake.Information(p.ArtifactInstance); _globalInfo.Cake.DotNetCorePack(p.Project.Path.FullPath, settings); } }
void StandardCreateNuGetPackages(NuGetArtifactType nugetInfo) { var settings = new DotNetCorePackSettings().AddVersionArguments(nugetInfo.GlobalInfo.GitInfo, c => { // IsPackable=true is required for Tests package. Without this Pack on Tests projects // does not generate nupkg. c.ArgumentCustomization += args => args.Append("/p:IsPackable=true"); c.NoBuild = true; c.IncludeSymbols = true; c.Configuration = nugetInfo.GlobalInfo.BuildConfiguration; c.OutputDirectory = nugetInfo.GlobalInfo.ReleasesFolder.Path; }); foreach (var p in nugetInfo.GetNuGetArtifacts()) { Cake.Information(p.ArtifactInstance); Cake.DotNetCorePack(p.Project.Path.FullPath, settings); } }