chocolatey-licensed-issues icon indicating copy to clipboard operation
chocolatey-licensed-issues copied to clipboard

Build Package Option For Choco New Command Not Working

Open sync-by-unito[bot] opened this issue 1 year ago • 0 comments

What You Are Seeing?

When running the choco new command with the --build-package switch it does not pack and generate a .nupkg file.

What is Expected?

Passing --build-package to choco new should pack the .nuspec creating a .nupkg file.

How Did You Get This To Happen? (Steps to Reproduce)

  1. Have a Chocolatey For Business machine configured(chocolatey CLI, chocolatey.extension, and chocolatey license installed)
  2. Run through the How to create a Package Template Doc
  3. On the Building Package From Template Step you'll notice the package is not created. Just templated out.

System Details

  • Operating System: Windows Server 2022
  • Windows PowerShell Version: 5.1
  • Chocolatey CLI Version: 2.2.2
  • Chocolatey Licensed Extension version: 6.1.1
  • Chocolatey License type (Professional / Business / ?): Business
  • Terminal/Emulator: Windows PowerShell

Output Log

chocolatey.log


LicensedInformation.LicenseExpirationDate='6/30/2024 12:00:00 AM'| LicensedInformation.LicenseNodeCount='100'| LicensedInformation.LicensedVersion='6.1.1.0'| ChocolateyVersion.Version='2.2.2.0'| ChocolateyVersion.IsLegacyVersion='False'| ChocolateyVersion.Revision='0'|ChocolateyVersion.IsSemVer2='False'| ChocolateyVersion.OriginalVersion='2.2.2.0'| ChocolateyVersion.Major='2'| ChocolateyVersion.Minor='2'|ChocolateyVersion.Patch='2'| ChocolateyVersion.IsPrerelease='False'| ChocolateyVersion.HasMetadata='False'| LicensedFeatures.UseDownloadCache='True'| LicensedFeatures.AllowSynchronization='True'| LicensedFeatures.AllowBackgroundServiceOverride='False'| LicensedFeatures.UseBackgroundService='False'| LicensedFeatures.UseBackgroundServiceWithSelfServiceSourcesOnly='True'| LicensedFeatures.UseBackgroundServiceWithNonAdministratorsOnly='False'| LicensedFeatures.UseBackgroundServiceInteractively='False'| LicensedFeatures.UseBackgroundServiceWithEmptySessions='True'| LicensedFeatures.AllowBackgroundServiceUninstallsFromUserInstallsOnly='False'|

LicensedFeatures.AllowPreviewFeatures='False'| LicensedFeatures.ShowAllPackagesInProgramsAndFeatures='False'| LicensedFeatures.AdminOnlyExecutionForAllChocolateyCommands='False'| LicensedFeatures.AdminOnlyExecutionForNewCommand='False'| LicensedFeatures.AdminOnlyExecutionForDownloadCommand='False'| LicensedFeatures.ReduceInstalledPackageSize='True'| LicensedFeatures.ReduceOnlyNupkgSize='False'| LicensedFeatures.UseLocalSystemForServiceInstalls='True'| LicensedFeatures.WarnOnUpcomingLicenseExpiration='True'| LicensedFeatures.UseChocolateyCentralManagement='True'| LicensedFeatures.UseChocolateyCentralManagementDeployments='True'| LicensedFeatures.UseLogRetentionPolicy='True'| LicensedFeatures.ExcludeChocolateyPackagesDuringUpgradeAll='False'| LicensedNewCommand.UseOriginalFilesLocation='False'| LicensedNewCommand.PauseOnError='False'| LicensedNewCommand.BuildPackage='True'| LicensedNewCommand.GeneratePackagesFromSoftwareInstalls='False'| LicensedNewCommand.IncludeArchitectureInPackageId='False'| LicensedDownloadCommand.Internalize='False'| LicensedDownloadCommand.AppendUseOriginalLocation='True'| LicensedDownloadCommand.InternalizeAnyUrlFound='False'| LicensedDownloadCommand.DownloadInstalledPackages='False'| LicensedDownloadCommand.IgnoreUnfoundPackages='False'| LicensedConvertCommand.IncludeAll='False'| LicensedConvertCommand.IncludeDependencies='False'| LicensedPushCommand.IntuneAuthenticationUrl='https://login.microsoftonline.com'|

LicensedPushCommand.IntuneApiUrl='https://graph.microsoft.com'| LicensedPushCommand.IntuneRetryIntervalInSeconds='5'| LicensedPushCommand.IntuneUploadTimeoutInSeconds='600'| LicensedPushCommand.IntuneUploadChunkSizeInMegabytes='10'| LicensedPushCommand.SkipCleanup='False'| LicensedListCommand.ShowAuditInformation='False'| LicensedListCommand.ShowDisplayVersion='False'| LicensedUninstallCommand.FromProgramsAndFeatures='False'| VirusConfiguration.VirusCheckMinimumPositives='4'| VirusConfiguration.VirusScannerType='Generic'| VirusConfiguration.GenericVirusScannerArgs=''[[File]]''| VirusConfiguration.GenericVirusScannerValidExitCodes='0'| VirusConfiguration.GenericVirusScannerTimeoutInSeconds='120'| LicensedServiceInstaller.DefaultUserName='ChocolateyLocalAdmin'| CentralManagementConfiguration.ReportPackagesTimerIntervalInSeconds='1800'|

CentralManagementConfiguration.ServiceUrl='https://Testy:24020/ChocolateyManagementService'|

CentralManagementConfiguration.ReceiveTimeoutInSeconds='30'| CentralManagementConfiguration.SendTimeoutInSeconds='30'| CentralManagementConfiguration.CertificateValidationMode='PeerOrChainTrust'|

CentralManagementConfiguration.MaxReceiveMessageSizeInBytes='2147483647'|

CentralManagementConfiguration.DeploymentCheckTimerIntervalInSeconds='180'|

LicensedBackgroundService.LogRetentionPolicyInDays='30'| CommandName='new'| CacheLocation='C:\Users\Administrator\AppData\Local\Temp\chocolatey'| CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'| Sources='https://Testy:8443/repository/ChocolateyInternal/;https://testy:8443/repository/ChocoCorePkgs/index.json;https://licensedpackages.chocolatey.org/api/v2/;https://community.chocolatey.org/api/v2/;C:\Users\Administrator\tutorials'|

SourceType='normal'|ShowOnlineHelp='False'|Debug='False'| Verbose='False'|Trace='False'|Force='True'|Noop='False'| HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'| QuietOutput='False'|PromptForConfirmation='True'| DisableCompatibilityChecks='False'|AcceptLicense='False'| AllowUnofficialBuild='False'|Input='template-tutorial Country:USA'| AllVersions='False'|SkipPackageInstallProvider='False'| SkipHookScripts='False'|Prerelease='False'|ForceX86='False'| OverrideArguments='False'|NotSilent='False'| ApplyPackageParametersToDependencies='False'| ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'| CacheExpirationInMinutes='30'|AllowDowngrade='False'| ForceDependencies='False'|DownloadChecksumType='sha256'| DownloadChecksumType64='sha256'|PinPackage='False'| Information.PlatformType='Windows'| Information.PlatformVersion='10.0.20348.0'| Information.PlatformName='Windows Server 2016'| Information.ChocolateyVersion='2.2.2.0'| Information.ChocolateyProductVersion='2.2.2'| Information.FullName='choco, Version=2.2.2.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64BitOperatingSystem='True'| Information.Is64BitProcess='True'|Information.IsInteractive='True'| Information.UserName='Administrator'| Information.UserDomainName='TESTY'| Information.IsUserAdministrator='True'| Information.IsUserSystemAccount='False'| Information.IsUserRemoteDesktop='False'| Information.IsUserRemote='False'|Information.IsProcessElevated='True'| Information.IsLicensedVersion='True'| Information.IsLicensedAssemblyLoaded='True'| Information.LicenseType='BusinessTrial'| Information.CurrentDirectory='C:\Users\Administrator\tutorials'| Features.AutoUninstaller='True'|Features.ChecksumFiles='True'| Features.AllowEmptyChecksums='False'| Features.AllowEmptyChecksumsSecure='True'| Features.FailOnAutoUninstaller='False'| Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'| Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'| Features.VirusCheck='False'| Features.FailOnInvalidOrMissingLicense='False'| Features.IgnoreInvalidOptionsSwitches='True'| Features.UsePackageExitCodes='True'| Features.UseEnhancedExitCodes='False'| Features.UseFipsCompliantChecksums='False'| Features.ShowNonElevatedWarnings='True'| Features.ShowDownloadProgress='True'| Features.StopOnFirstPackageFailure='False'| Features.UseRememberedArgumentsForUpgrades='False'| Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'| Features.SkipPackageUpgradesWhenNotInstalled='False'| Features.RemovePackageInformationOnUninstall='False'| Features.ExitOnRebootDetected='False'| Features.LogValidationResultsOnWarnings='True'| Features.UsePackageRepositoryOptimizations='True'| ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'| ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'| ListCommand.Exact='False'|ListCommand.ByIdOnly='False'| ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'| ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'| ListCommand.DownloadCacheAvailable='False'| ListCommand.NotBroken='False'| ListCommand.IncludeVersionOverrides='False'| ListCommand.ExplicitPageSize='False'| ListCommand.ExplicitSource='False'| UpgradeCommand.FailOnUnfound='False'| UpgradeCommand.FailOnNotInstalled='False'| UpgradeCommand.NotifyOnlyAvailableUpgrades='False'| UpgradeCommand.ExcludePrerelease='False'| NewCommand.TemplateName='TutorialTemplate'| NewCommand.Name='template-tutorial'| NewCommand.AutomaticPackage='False'| NewCommand.TemplateProperties.PackageVersion='1.0.0'| NewCommand.TemplateProperties.PackageName='template-tutorial'| NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'| SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'| SourceCommand.AllowSelfService='False'| SourceCommand.VisibleToAdminsOnly='False'| FeatureCommand.Command='unknown'|ConfigCommand.Command='Unknown'| ApiKeyCommand.Command='Unknown'|PinCommand.Command='Unknown'| OutdatedCommand.IgnorePinned='False'| ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'| TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'| CacheCommand.RemoveExpiredItemsOnly='False'| 2024-01-22 15:23:16,189 5280 [DEBUG] - _ Chocolatey:ProChocolateyNewCommand - Normal Run Mode _ 2024-01-22 15:23:16,189 5280 [INFO ] - Creating a new package specification at C:\Users\Administrator\tutorials\template-tutorial 2024-01-22 15:23:16,189 5280 [DEBUG] - Attempting to delete directory "C:\Users\Administrator\tutorials\template-tutorial". 2024-01-22 15:23:16,204 5280 [DEBUG] - Attempting to create directory "C:\Users\Administrator\tutorials\template-tutorial". 2024-01-22 15:23:16,204 5280 [DEBUG] - Attempting to create directory "C:\Users\Administrator\tutorials\template-tutorial\tools". 2024-01-22 15:23:16,204 5280 [DEBUG] - Set token for 'PackageVersion' to '1.0.0' 2024-01-22 15:23:16,204 5280 [DEBUG] - Set token for 'PackageName' to 'template-tutorial' 2024-01-22 15:23:16,204 5280 [DEBUG] - Token Values after merge: 2024-01-22 15:23:16,204 5280 [DEBUG] -  PackageName=template-tutorial 2024-01-22 15:23:16,204 5280 [DEBUG] -  PackageNameLower=template-tutorial 2024-01-22 15:23:16,204 5280 [DEBUG] -  PackageVersion=1.0.0 2024-01-22 15:23:16,204 5280 [DEBUG] -  MaintainerName=**REPLACE_YOUR_NAME** 2024-01-22 15:23:16,204 5280 [DEBUG] -  MaintainerRepo=**REPLACE_YOUR_REPO** 2024-01-22 15:23:16,204 5280 [DEBUG] -  AutomaticPackageNotesInstaller= 2024-01-22 15:23:16,204 5280 [DEBUG] -  AutomaticPackageNotesNuspec= 2024-01-22 15:23:16,204 5280 [DEBUG] -  InstallerType=EXE_MSI_OR_MSU 2024-01-22 15:23:16,204 5280 [DEBUG] -  Url= 2024-01-22 15:23:16,204 5280 [DEBUG] -  Url64= 2024-01-22 15:23:16,204 5280 [DEBUG] -  SilentArgs=/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`" 2024-01-22 15:23:16,204 5280 [DEBUG] -  Checksum= 2024-01-22 15:23:16,204 5280 [DEBUG] -  ChecksumType=sha256 2024-01-22 15:23:16,204 5280 [DEBUG] -  Checksum64= 2024-01-22 15:23:16,204 5280 [DEBUG] -  ChecksumType64=sha256 2024-01-22 15:23:16,204 5280 [DEBUG] -  AdditionalProperties=System.Collections.Generic.Dictionary`2[System.String,System.String] 2024-01-22 15:23:16,204 5280 [INFO ] - Generating package from custom template at 'C:\ProgramData\chocolatey\templates\TutorialTemplate'. 2024-01-22 15:23:16,204 5280 [DEBUG] - Creating directory C:\Users\Administrator\tutorials\template-tutorial\tools 2024-01-22 15:23:16,220 5280 [INFO ] - Generating template to a file  at 'C:\Users\Administrator\tutorials\template-tutorial\template-tutorial.nuspec' 2024-01-22 15:23:16,220 5280 [DEBUG] - <package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">   <metadata>     <id>template-tutorial</id>     <version>1.0.0</version>     <owners>SweetTooth</owners>     <title>template-tutorial (Install)</title>     <authors>Chocolatey]</authors>     <tags>template</tags>     <summary>Tutorial package from template</summary>     <description>This was built from a template with [[Country]] passed to it.</description>   </metadata>   <!-- this section controls what actually gets packaged into the Chocolatey package -->   <files>     <file src="tools\**" target="tools" />   </files> </package>

2024-01-22 15:23:16,220 5280 [INFO ] - Generating template to a file  at 'C:\Users\Administrator\tutorials\template-tutorial\tools\chocolateyInstall.ps1' 2024-01-22 15:23:16,220 5280 [DEBUG] - Write-Host "I am from [[Country]]"

2024-01-22 15:23:16,220 5280 [INFO ] - Successfully generated template-tutorial package specification files  at 'C:\Users\Administrator\tutorials\template-tutorial' 2024-01-22 15:23:16,220 5280 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers... 2024-01-22 15:23:16,236 5280 [DEBUG] - [Countdown] Determining how long until license expires 2024-01-22 15:23:16,252 5280 [DEBUG] - chocolatey 2.2.2 2024-01-22 15:23:16,252 5280 [DEBUG] - chocolatey.extension 6.1.1 2024-01-22 15:23:16,252 5280 [DEBUG] - chocolatey-agent 2.1.1 2024-01-22 15:23:16,252 5280 [DEBUG] - chocolatey-compatibility.extension 1.0.0 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolatey-core.extension 1.4.0 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolatey-dotnetfx.extension 1.0.1 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolateygui 2.1.0 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolateygui.extension 2.0.0 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolatey-license 2024.6.30.100 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolatey-management-database 0.12.0 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolatey-management-service 0.12.0 2024-01-22 15:23:16,267 5280 [DEBUG] - chocolatey-management-web 0.12.0 2024-01-22 15:23:16,283 5280 [DEBUG] - chocolatey-vscode 0.7.2 2024-01-22 15:23:16,283 5280 [DEBUG] - chocolatey-vscode.extension 1.1.0 2024-01-22 15:23:16,283 5280 [DEBUG] - chocolatey-windowsupdate.extension 1.0.5 2024-01-22 15:23:16,283 5280 [DEBUG] - dotnet-6.0-aspnetruntime 6.0.22 2024-01-22 15:23:16,283 5280 [DEBUG] - dotnet-6.0-runtime 6.0.22 2024-01-22 15:23:16,283 5280 [DEBUG] - dotnet-aspnetcoremodule-v2 16.0.23237 2024-01-22 15:23:16,283 5280 [DEBUG] - dotnetfx 4.8.0.20220524 2024-01-22 15:23:16,283 5280 [DEBUG] - jenkins 2.426.2 2024-01-22 15:23:16,283 5280 [DEBUG] - KB2919355 1.0.20160915 2024-01-22 15:23:16,283 5280 [DEBUG] - KB2919442 1.0.20160915 2024-01-22 15:23:16,298 5280 [DEBUG] - KB2999226 1.0.20181019 2024-01-22 15:23:16,298 5280 [DEBUG] - KB3033929 1.0.5 2024-01-22 15:23:16,298 5280 [DEBUG] - KB3035131 1.0.3 2024-01-22 15:23:16,298 5280 [DEBUG] - KB3063858 1.0.0 2024-01-22 15:23:16,298 5280 [DEBUG] - microsoft-edge 120.0.2210.91 2024-01-22 15:23:16,298 5280 [DEBUG] - nexus-repository 3.63.0.1 2024-01-22 15:23:16,298 5280 [DEBUG] - sql-server-express 2022.16.0.1000 2024-01-22 15:23:16,298 5280 [DEBUG] - sql-server-management-studio 19.2.56.2 2024-01-22 15:23:16,298 5280 [DEBUG] - Temurin21jre 21.0.1.1200 2024-01-22 15:23:16,298 5280 [DEBUG] - vcredist140 14.38.33130 2024-01-22 15:23:16,314 5280 [DEBUG] - vscode 1.85.2 2024-01-22 15:23:16,314 5280 [DEBUG] - vscode.install 1.85.2 2024-01-22 15:23:16,314 5280 [DEBUG] - vscode-powershell 2024.0.0 2024-01-22 15:23:16,345 5280 [DEBUG] - [Programs & Features Package Sync] Ensuring all installed packages that don't have software natively installed are not listed in Programs and Features. 2024-01-22 15:23:16,361 5280 [DEBUG] - chocolatey 2.2.2 2024-01-22 15:23:16,361 5280 [DEBUG] - chocolatey.extension 6.1.1 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-agent 2.1.1 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-compatibility.extension 1.0.0 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-core.extension 1.4.0 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-dotnetfx.extension 1.0.1 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolateygui 2.1.0 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolateygui.extension 2.0.0 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-license 2024.6.30.100 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-management-database 0.12.0 2024-01-22 15:23:16,376 5280 [DEBUG] - chocolatey-management-service 0.12.0 2024-01-22 15:23:16,392 5280 [DEBUG] - chocolatey-management-web 0.12.0 2024-01-22 15:23:16,392 5280 [DEBUG] - chocolatey-vscode 0.7.2 2024-01-22 15:23:16,392 5280 [DEBUG] - chocolatey-vscode.extension 1.1.0 2024-01-22 15:23:16,392 5280 [DEBUG] - chocolatey-windowsupdate.extension 1.0.5 2024-01-22 15:23:16,392 5280 [DEBUG] - dotnet-6.0-aspnetruntime 6.0.22 2024-01-22 15:23:16,392 5280 [DEBUG] - dotnet-6.0-runtime 6.0.22 2024-01-22 15:23:16,392 5280 [DEBUG] - dotnet-aspnetcoremodule-v2 16.0.23237 2024-01-22 15:23:16,392 5280 [DEBUG] - dotnetfx 4.8.0.20220524 2024-01-22 15:23:16,392 5280 [DEBUG] - jenkins 2.426.2 2024-01-22 15:23:16,392 5280 [DEBUG] - KB2919355 1.0.20160915 2024-01-22 15:23:16,392 5280 [DEBUG] - KB2919442 1.0.20160915 2024-01-22 15:23:16,392 5280 [DEBUG] - KB2999226 1.0.20181019 2024-01-22 15:23:16,392 5280 [DEBUG] - KB3033929 1.0.5 2024-01-22 15:23:16,392 5280 [DEBUG] - KB3035131 1.0.3 2024-01-22 15:23:16,409 5280 [DEBUG] - KB3063858 1.0.0 2024-01-22 15:23:16,409 5280 [DEBUG] - microsoft-edge 120.0.2210.91 2024-01-22 15:23:16,409 5280 [DEBUG] - nexus-repository 3.63.0.1 2024-01-22 15:23:16,409 5280 [DEBUG] - sql-server-express 2022.16.0.1000 2024-01-22 15:23:16,409 5280 [DEBUG] - sql-server-management-studio 19.2.56.2 2024-01-22 15:23:16,409 5280 [DEBUG] - Temurin21jre 21.0.1.1200 2024-01-22 15:23:16,409 5280 [DEBUG] - vcredist140 14.38.33130 2024-01-22 15:23:16,409 5280 [DEBUG] - vscode 1.85.2 2024-01-22 15:23:16,409 5280 [DEBUG] - vscode.install 1.85.2 2024-01-22 15:23:16,409 5280 [DEBUG] - vscode-powershell 2024.0.0 2024-01-22 15:23:16,455 5280 [DEBUG] - Exiting with 0 ~~~ </p></details>

## Workarounds
Run a `choco pack` against you .nuspec file.

## Proposed Solution
N/A

## Related Issues and Tickets
* [Zendesk Ticket](https://chocolatey.zendesk.com/agent/tickets/20726)
* [GitHub Issue]()

## Done Checklist
* [ ] Documentation has been updated.
* [ ] Automated tests have been added to cover this bug.
* [ ] Manual tests have been added to cover this bug.
* [ ] Title is suitable for using in Release Notes?



┆Issue is synchronized with this [Gitlab issue](https://gitlab.com/chocolatey/collaborators/choco-licensed/-/issues/706) by [Unito](https://www.unito.io)

sync-by-unito[bot] avatar Feb 15 '24 11:02 sync-by-unito[bot]