Unable to install octopus.client nuget package

Hi,
According to https://octopus.com/docs/api-and-integration/octopus.client all I need to do to install the latest version of the client is
Install-Package Octopus.Client

However, when I run this in an elevated powershell command I gen the error:

Install-Package : No match was found for the specified search criteria and package name 'Octopus.Client'. Try
Get-PackageSource to see all available registered package sources.
At line:1 char:1
+ Install-Package Octopus.Client
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
   ception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Is the package missing from the repository?
Thanks

Hi there,

Thanks for reaching out. The package is in the public NuGet repository.

  • What do you get when you run Get-PackageSource like the error message recommends?
  • What do you get when you run Get-PackageSource -ProviderName nuget ?

Best regards,
Dalmiro

  • What do you get when you run Install-Package Octopus.client -verbose ?

Screenshots or full console output would be the best for all tests :slight_smile:

Hi Dalmiro,
Here is a screenshot of my attempts

Thanks

Hi,

I’m gonna look into this in shortly. In the meantime can you add the Octopus.Client to your project/solution from the Visual Studio UI? https://docs.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio#package-manager-ui

Let me know if that works

Hi,
I have no problem adding or updating the octopus client in a visual studio project - just powershell.
The solution I have is powershell based and I need to distribute this to other computers. Therefore I need to install the powershell module on other computers. This is where I have come unstuck.

A bit of further information

PS C:\WINDOWS\system32> find-package "octopus*" | select name,version

Name                  Version
----                  -------
OctopusDSC            4.0.327
Octopus-Cmdlets       0.4.4
Octopus               1.0
OctopusProjectsDSC    1.5.1
OctopusStepTemplateCi 1.1.29

There is no Octopus.Client listed

Hi there,

Sorry for the delay here. I was getting the same error as you, and after some long and tedious googling I found this which seems to match our scenarios: https://github.com/OneGet/oneget/issues/172

Apparently the v3 feed of NuGet doesn’t quite work with Install-package. Can you try v2 as mentioned in that Github Issue and let me know if that works for you?

Best regards,
Dalmiro

Hi,
You are correct in that the v3 github does not support the download.
I attempted the v2 as follows:

PS C:\WINDOWS\system32> install-package octopus.client -source https://www.nuget.org/api/v2/ -provider nuget -verbose
VERBOSE: Using the provider 'NuGet' for searching packages.
VERBOSE: Searching repository 'https://www.nuget.org/api/v2/FindPackagesById()?id='octopus.client'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'octopus.client'.
VERBOSE: Performing the operation "Install Package" on target "Package 'Octopus.Client' version '4.37.0' from
'https://www.nuget.org/api/v2/'.".

The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'https://www.nuget.org/api/v2/'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): a
VERBOSE: Searching repository 'https://www.nuget.org/api/v2/FindPackagesById()?id='Octopus.Client'' for ''.
VERBOSE: Searching repository 'https://www.nuget.org/api/v2/FindPackagesById()?id='NETStandard.Library'' for ''.
VERBOSE: Searching repository 'https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.NETCore.Platforms'' for
''.
<snip>...
VERBOSE: Searching repository 'https://www.nuget.org/api/v2/FindPackagesById()?id='System.Threading.Thread'' for ''.
VERBOSE: Searching repository 'https://www.nuget.org/api/v2/FindPackagesById()?id='System.Net.Http'' for ''.
VERBOSE: InstallPackage' - name='Microsoft.NETCore.Platforms', version='2.1.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: DownloadPackage' - name='Microsoft.NETCore.Platforms', version='2.1.0',destination='C:\Program
Files\PackageManagement\NuGet\Packages\Microsoft.NETCore.Platforms.2.1.0\Microsoft.NETCore.Platforms.2.1.0.nupkg', uri='https://www.nuget.org/api/v2/package/Microsoft.NETCore.Platforms/2.1.0'
VERBOSE: Downloading 'https://www.nuget.org/api/v2/package/Microsoft.NETCore.Platforms/2.1.0'.
VERBOSE: Completed downloading 'https://www.nuget.org/api/v2/package/Microsoft.NETCore.Platforms/2.1.0'.
VERBOSE: Completed downloading 'Microsoft.NETCore.Platforms'.
VERBOSE: Hash for package 'Microsoft.NETCore.Platforms' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='Microsoft.NETCore.Platforms', version='2.1.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: InstallPackage' - name='Microsoft.NETCore.Targets', version='2.1.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: DownloadPackage' - name='Microsoft.NETCore.Targets', version='2.1.0',destination='C:\Program
Files\PackageManagement\NuGet\Packages\Microsoft.NETCore.Targets.2.1.0\Microsoft.NETCore.Targets.2.1.0.nupkg', uri='https://www.nuget.org/api/v2/package/Microsoft.NETCore.Targets/2.1.0'
VERBOSE: Downloading 'https://www.nuget.org/api/v2/package/Microsoft.NETCore.Targets/2.1.0'.
VERBOSE: Completed downloading 'https://www.nuget.org/api/v2/package/Microsoft.NETCore.Targets/2.1.0'.
VERBOSE: Completed downloading 'Microsoft.NETCore.Targets'.
VERBOSE: Hash for package 'Microsoft.NETCore.Targets' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='Microsoft.NETCore.Targets', version='2.1.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'

Name                           Version          Source                           Summary
----                           -------          ------                           -------
Microsoft.NETCore.Platforms    2.1.0            https://www.nuget.org/api/v2/    Provides runtime information required to resolve target framework, platform, and runtime specific implementat...
VERBOSE: InstallPackage' - name='System.Runtime', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: DownloadPackage' - name='System.Runtime', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages\System.Runtime.4.3.0\System.Runtime.4.3.0.nupkg',
uri='https://www.nuget.org/api/v2/package/System.Runtime/4.3.0'
VERBOSE: Downloading 'https://www.nuget.org/api/v2/package/System.Runtime/4.3.0'.
VERBOSE: Completed downloading 'https://www.nuget.org/api/v2/package/System.Runtime/4.3.0'.
VERBOSE: Completed downloading 'System.Runtime'.
VERBOSE: Hash for package 'System.Runtime' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='System.Runtime', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
Microsoft.NETCore.Targets      2.1.0            https://www.nuget.org/api/v2/    Provides supporting infrastructure for portable projects: support identifiers that define framework and runti...
VERBOSE: InstallPackage' - name='System.Text.Encoding', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: DownloadPackage' - name='System.Text.Encoding', version='4.3.0',destination='C:\Program
Files\PackageManagement\NuGet\Packages\System.Text.Encoding.4.3.0\System.Text.Encoding.4.3.0.nupkg', uri='https://www.nuget.org/api/v2/package/System.Text.Encoding/4.3.0'
VERBOSE: Downloading 'https://www.nuget.org/api/v2/package/System.Text.Encoding/4.3.0'.
VERBOSE: Completed downloading 'https://www.nuget.org/api/v2/package/System.Text.Encoding/4.3.0'.
VERBOSE: Completed downloading 'System.Text.Encoding'.
VERBOSE: Hash for package 'System.Text.Encoding' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='System.Text.Encoding', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
System.Runtime                 4.3.0            https://www.nuget.org/api/v2/    Provides the fundamental primitives, classes and base classes that define commonly-used value and reference d...
VERBOSE: InstallPackage' - name='System.Threading.Tasks', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: DownloadPackage' - name='System.Threading.Tasks', version='4.3.0',destination='C:\Program
Files\PackageManagement\NuGet\Packages\System.Threading.Tasks.4.3.0\System.Threading.Tasks.4.3.0.nupkg', uri='https://www.nuget.org/api/v2/package/System.Threading.Tasks/4.3.0'
VERBOSE: Downloading 'https://www.nuget.org/api/v2/package/System.Threading.Tasks/4.3.0'.
VERBOSE: Completed downloading 'https://www.nuget.org/api/v2/package/System.Threading.Tasks/4.3.0'.
<snip>...
VERBOSE: InstallPackageLocal' - name='System.Threading.Thread', version='4.3.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
System.ComponentModel.Primi... 4.3.0            https://www.nuget.org/api/v2/    Provides interfaces that are used to implement the run-time and design-time behavior of components....
VERBOSE: InstallPackage' - name='Octopus.Client', version='4.37.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
VERBOSE: DownloadPackage' - name='Octopus.Client', version='4.37.0',destination='C:\Program Files\PackageManagement\NuGet\Packages\Octopus.Client.4.37.0\Octopus.Client.4.37.0.nupkg',
uri='https://www.nuget.org/api/v2/package/Octopus.Client/4.37.0'
VERBOSE: Downloading 'https://www.nuget.org/api/v2/package/Octopus.Client/4.37.0'.
VERBOSE: Completed downloading 'https://www.nuget.org/api/v2/package/Octopus.Client/4.37.0'.
VERBOSE: Completed downloading 'Octopus.Client'.
VERBOSE: Hash for package 'Octopus.Client' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='Octopus.Client', version='4.37.0',destination='C:\Program Files\PackageManagement\NuGet\Packages'
System.Threading.Thread        4.3.0            https://www.nuget.org/api/v2/    Provides the System.Threading.Thread class, which allows developers to create and control a thread, set its p...
Octopus.Client                 4.37.0           https://www.nuget.org/api/v2/    Octopus Deploy is an automated release management tool for modern developers and DevOps teams....


PS C:\WINDOWS\system32>

As can be seen, it was successful.

You may want to consider publishing to the v3 repository to avoid future complications.

Thanks

Unless I’m terribly wrong, I believe there’s only one repository and 2 (v2 and v3) API versions available to access it. So its not like we have to push the package to a V2 and a V3 repository separately.

That said, I’m very glad to hear you are back up and running :slight_smile:

cheers!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.