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
-
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
-
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.
-
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
-
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.