Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Deploying Packages from ProGet with Powershell Packetmanager

    Scheduled Pinned Locked Moved Support
    powershellnugetpackagesproget
    4 Posts 2 Posters 95 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Hi Guys
      I'm currently trying out ProGet and I'm facing an issue. I Installed the Application on my Windows 2016 Server (Lab environment), which worked like a charm. The Application runs no problem at all. Now What I wanna do is, deploy nuget Packages with the powershell PackageManagement Module. Specifically with the install-package cmdlet.

      So I created a nuget feed in ProGet and uploaded a nuget Package which (when it would work) installs 7Zip. I created the nuget Package with the Package create command from chocolatey so basically just from a nuspec file which then points to the tools folder where the msi and the installation script (init.ps1) are saved. Then what I try to do is install the Package from my ProGet Repo which would look like this:

      Install-Package -Name 7Zip -Source http://localhost:8624/nuget/Test/ -force

      What that does is it creates me a folder named "7zip.1.0" containing the packagefile and the extracted tools folder in "C:\Program Files\PackageManagement\NuGet\Packages". That's it. No error and no Installation. I'm gonna paste the verbose of the command at the end.

      Did you already have that issue once? Or is it something new? Is this some kind of Bug?
      I thought since Powershell now offers an own Toolset to manage Packages it would be nice to use that.

      Thanks for your time!

      The Verbose Output of the command looks like this:

      VERBOSE: Using the provider 'NuGet' for searching packages.
      VERBOSE: Searching repository 'http://localhost:8624/nuget/Test/FindPackagesById()?id='7Zip'' for ''.
      VERBOSE: Total package yield:'1' for the specified package '7Zip'.
      VERBOSE: Performing the operation "Install Package" on target "Package '7zip' version '1.0' from 'test'.".
      VERBOSE: Searching repository 'http://localhost:8624/nuget/Test/FindPackagesById()?id='7zip'' for ''.
      VERBOSE: InstallPackage' - name='7zip', version='1.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
      VERBOSE: DownloadPackage' - name='7zip', version='1.0',destination='C:\Program
      Files\PackageManagement\NuGet\Packages\7zip.1.0\7zip.1.0.nupkg',
      uri='http://localhost:8624/nuget/Test/package/7zip/1.0'
      VERBOSE: Downloading 'http://localhost:8624/nuget/Test/package/7zip/1.0'.
      VERBOSE: Completed downloading 'http://localhost:8624/nuget/Test/package/7zip/1.0'.
      VERBOSE: Completed downloading '7zip'.
      VERBOSE: Hash for package '7zip' does not match hash provided from the server.
      VERBOSE: InstallPackageLocal' - name='7zip', version='1.0',destination='C:\Program
      Files\PackageManagement\NuGet\Packages'

      Product: ProGet
      Version: 5.0.10

      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        You'll want to use Chocolatey for this purpose; it's designed to install Windows software.

        The PackageManagement module is intended for powershell modules for your PS runtime environment.

        Both of them use NuGet behind the scenes, but we still recommend to create the appropriate feed for the type.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Hi Alana

          Thanks for your reply!

          Do you mean I should use the choco.exe? So installing with choco install <software>? Cause that would mean you have to deploy this exe on all the machines you want to install software on right? I thought it would be more elegant to use the built in functionality of Windows. I tried the same thing as mentioned above with a chocolatey feed in proget and I got the same results.. also the Package just downloaded but did not install..

          Isn't PowershellGet for installing Modules and Scripts? I thought PackageManagement(OneGet) would let you download packages via chocolatey aka a package manager..

          Regards,
          Kevin

          1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer
            last edited by

            I'm not too familiar with how OneGet fits into all this; you'd really be better asking this question at the Chocolatey or OneGet forum. You'll still use ProGet to host the packages, but I'm really not sure which client tool (choco, etc) will do the download and install on a desktop.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation