PackageManagement PowerShell Modules

Ryan's Avatar

Ryan

25 Oct, 2015 07:59 PM

Any way that the PowerShell PackageManagement Modules (previously known as OneGet) can be added to the build images? The PackageManagement modules are built in to WMF 5, but there is now a standalone version of it for PowerShell 3 / 4

They are available at https://www.microsoft.com/en-us/download/details.aspx?id=49186

These modules include the ability to install other modules from PowerShellGallery, and publish to the PowerShellGallery.

I have been able to work around them not being installed by basically installing the modules via a powershell script that downloads a zip file with the modules in it.

  1. Support Staff 1 Posted by Feodor Fitsner on 26 Oct, 2015 08:41 PM

    Feodor Fitsner's Avatar

    I've added a new TODO item for deploying these modules.

    In the meantime they can be installed during the build with this simple PS script:

    $msiPath = "$($env:USERPROFILE)\PackageManagement_x64.msi"
    (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/4/1/A/41A369FA-AA36-4EE9-845B-20BCC1691FC5/PackageManagement_x64.msi', $msiPath)
    cmd /c start /wait msiexec /i $msiPath /quiet
    
  2. 2 Posted by Ryan on 27 Oct, 2015 02:20 AM

    Ryan's Avatar

    Thanks, this is similar to what I tried initially. With this one, I do not get any type of error when executing the installer, and it seems to exit but calling "Install-Module -Name PSScriptAnalyzer -Force;" after fails.

    My custom chocolatey package that was basically installing the msi would hang during the install. Which is why I took the modules out of the installer, put them in a zip file and I download and extract that.

    Hopefully this works for others, but doesn't seem to work for me. I will continue to use my zip with the modules until they are added to the image.

  3. 3 Posted by Micah Rairdon on 28 Jul, 2016 10:46 PM

    Micah Rairdon's Avatar

    Just a note for others since this is the top result for "Install-Module AppVeyor" on Google.

    AppVeyor is now using WMF5 so package management is built in.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:07 AM.

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

Keyboard shortcuts

Generic

? 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

Recent Discussions

18 Jan, 2020 11:37 AM
18 Jan, 2020 05:35 AM
18 Jan, 2020 02:13 AM
18 Jan, 2020 12:16 AM
17 Jan, 2020 11:13 PM