chocolatey - cpack not working on build instance

aqilzeeshan's Avatar


08 Jul, 2014 05:12 PM


After build , I want to create chocolatey package using cpack so it can be pushed to myget.

I assume cpack should work fine as chocolatey is already installed on build instances but running cpack returns following error that CPack generator not specified. Any idea what is wrong. I expect in this case it should simply say 'Please specify a nuspec or project file to use.' but instead it shows this error

1Build started
2git clone -q --branch=master C:\projects\sandbox
3git checkout -qf ed6836cd1e7a518db586671d09f63624f0c940d6
4Running Install scripts
6cpack : CPack Error: CPack generator not specified
7At line:1 char:1
8+ cpack
9+ ~~~~~
10 + CategoryInfo : NotSpecified: (CPack Error: CP...r not specified:String) [], RemoteException
11 + FullyQualifiedErrorId : NativeCommandError
13Command executed with exception: CPack Error: CPack generator not specified

  1. Support Staff 1 Posted by Feodor Fitsner on 08 Jul, 2014 06:50 PM

    Feodor Fitsner's Avatar

    Set "Install" script to CMD mode - that should do a trick.

  2. 2 Posted by aqilzeeshan on 09 Jul, 2014 11:48 AM

    aqilzeeshan's Avatar

    changed to CMD but same result.

    Build started
    2Fetching repository commit (ed6836c)...Done
    3Total: 32.4 MB in 65 files
    4Running Install scripts
    6CPack Error: CPack generator not specified
    7Command exited with code 1

  3. Support Staff 3 Posted by Feodor Fitsner on 09 Jul, 2014 11:54 AM

    Feodor Fitsner's Avatar

    OK, I see now. I thought you are call cpack which is part of cmake and installed on build workers :)

    Switch back to PowerShell and call choco pack instead.

  4. 4 Posted by aqilzeeshan on 09 Jul, 2014 01:16 PM

    aqilzeeshan's Avatar

    Thanks. It worked.

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:45 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac