Bug 42820 - nuget install Fails with Mono-4.4.1 in CentOS 7.2
Summary: nuget install Fails with Mono-4.4.1 in CentOS 7.2
Status: RESOLVED DUPLICATE of bug 41953
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.4.0 (C7)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Jo Shields
URL:
Depends on:
Blocks:
 
Reported: 2016-07-26 21:54 UTC by Venkatrangan Govindarajan
Modified: 2016-07-28 13:34 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
MONO DEBUG LOGS (1.16 MB, text/plain)
2016-07-27 01:44 UTC, Venkatrangan Govindarajan
Details

Description Venkatrangan Govindarajan 2016-07-26 21:54:10 UTC
nuget install Fails after I did yum update mono-complete on 19-July-2016. 

Platform : Cent OS 7.2.11

When I revert to mono-complete-4.2.3.4, things are working fine.

I tried with Verbosity detailed and this what It returned

uget install SCVMM_MONO_REFERENCE_ASSEMBLIES -Verbosity detailed > fil
System.InvalidOperationException: Unable to find package 'SCVMM_MONO_REFERENCE_ASSEMBLIES'.
  at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, IPackageConstraintProvider constraintProvider, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) <0x40b3b430 + 0x0021f> in <filename unknown>:0 
  at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) <0x40b3b350 + 0x00047> in <filename unknown>:0 
  at NuGet.PackageManager.InstallPackage (System.String packageId, NuGet.SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) <0x40b3b2e0 + 0x0003b> in <filename unknown>:0 
  at NuGet.Commands.InstallCommand.InstallPackage (IFileSystem fileSystem, System.String packageId, NuGet.SemanticVersion version) <0x40a5e300 + 0x001f3> in <filename unknown>:0 
  at NuGet.Commands.InstallCommand.ExecuteCommand () <0x40a5c9d0 + 0x00183> in <filename unknown>:0 
  at NuGet.Commands.Command.Execute () <0x40a440b0 + 0x0034e> in <filename unknown>:0 
  at NuGet.Program.Main (System.String[] args) <0x40a02c30 + 0x005ee> in <filename unknown>:0 


The package exists: https://www.nuget.org/packages/SCVMM_MONO_REFERENCE_ASSEMBLIES/
Comment 1 Matt Ward 2016-07-26 22:03:39 UTC
Can you post the contents of your ~/.config/NuGet/NuGet.Config file?
Comment 2 Matt Ward 2016-07-26 22:08:48 UTC
Also can you post the mono version and nuget version? 'mono --version' and 'nuget' should show the version information.

Looking at the repo for Cent OS there is a mono-complete 4.4.1 which may contain NuGet 2.12:

http://download.mono-project.com/repo/centos/m/mono-core/

Older versions of Mono ship with NuGet 2.8.5.
Comment 3 Venkatrangan Govindarajan 2016-07-26 22:10:36 UTC
 cat .config/NuGet/NuGet.Config 
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
Comment 4 Venkatrangan Govindarajan 2016-07-26 22:11:05 UTC
Tried with the v2 url also, similar results
Comment 5 Matt Ward 2016-07-26 22:14:19 UTC
OK that NuGet.Config file will not work with NuGet v2. It is using a NuGet v3 url and NuGet v2 will not find any NuGet packages if that is defined. If you are using NuGet v2 then you should change the NuGet.Config file so it uses the NuGet v2 url - http://www.nuget.org/api/v2

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="http://www.nuget.org/api/v2" />
  </packageSources>
</configuration>
Comment 6 Venkatrangan Govindarajan 2016-07-26 22:17:22 UTC
 nuget install SCVMM_MONO_REFERENCE_ASSEMBLIES -Verbosity detailed 
GET http://www.nuget.org/api/v2/FindPackagesById()?$filter=IsLatestVersion&$orderby=Version desc&$top=1&id='SCVMM_MONO_REFERENCE_ASSEMBLIES'
WARNING: /usr/lib/libMonoPosixHelper.so
GET http://www.nuget.org/api/v2/FindPackagesById()?id='SCVMM_MONO_REFERENCE_ASSEMBLIES'
WARNING: Could not connect to the feed specified at 'http://www.nuget.org/api/v2'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.
System.InvalidOperationException: Unable to find package 'SCVMM_MONO_REFERENCE_ASSEMBLIES'.
  at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, IPackageConstraintProvider constraintProvider, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) <0x405161c0 + 0x0021f> in <filename unknown>:0 
  at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) <0x405160e0 + 0x00047> in <filename unknown>:0 
  at NuGet.PackageManager.InstallPackage (System.String packageId, NuGet.SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) <0x40516070 + 0x0003b> in <filename unknown>:0 
  at NuGet.Commands.InstallCommand.InstallPackage (IFileSystem fileSystem, System.String packageId, NuGet.SemanticVersion version) <0x40471fe0 + 0x001f3> in <filename unknown>:0 
  at NuGet.Commands.InstallCommand.ExecuteCommand () <0x404706b0 + 0x00183> in <filename unknown>:0 
  at NuGet.Commands.Command.Execute () <0x404581a0 + 0x0034e> in <filename unknown>:0 
  at NuGet.Program.Main (System.String[] args) <0x40415c30 + 0x005ee> in <filename unknown>:0
Comment 7 Venkatrangan Govindarajan 2016-07-26 22:19:39 UTC
nuget 
NuGet Version: 2.8.7.0
usage: NuGet <command> [args]

mono: 4.4.1
Comment 8 Matt Ward 2016-07-26 22:21:58 UTC
Can you try the https url instead:

https://www.nuget.org/api/v2/

With the http url NuGet seems to be failing to connect to the url, which is a different error to what you were originally seeing.
Comment 9 Venkatrangan Govindarajan 2016-07-26 22:26:49 UTC
Same error
nuget install SCVMM_MONO_REFERENCE_ASSEMBLIES -Verbosity detailed 
GET https://www.nuget.org/api/v2/FindPackagesById()?$filter=IsLatestVersion&$orderby=Version desc&$top=1&id='SCVMM_MONO_REFERENCE_ASSEMBLIES'
WARNING: /usr/lib/libMonoPosixHelper.so
GET https://www.nuget.org/api/v2/FindPackagesById()?id='SCVMM_MONO_REFERENCE_ASSEMBLIES'
WARNING: Could not connect to the feed specified at 'https://www.nuget.org/api/v2'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.
System.InvalidOperationException: Unable to find package 'SCVMM_MONO_REFERENCE_ASSEMBLIES'.
  at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, IPackageConstraintProvider constraintProvider, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) <0x40f4f750 + 0x0021f> in <filename unknown>:0 
  at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) <0x40f4f670 + 0x00047> in <filename unknown>:0 
  at NuGet.PackageManager.InstallPackage (System.String packageId, NuGet.SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) <0x40f4f600 + 0x0003b> in <filename unknown>:0 
  at NuGet.Commands.InstallCommand.InstallPackage (IFileSystem fileSystem, System.String packageId, NuGet.SemanticVersion version) <0x40e71fe0 + 0x001f3> in <filename unknown>:0 
  at NuGet.Commands.InstallCommand.ExecuteCommand () <0x40e706b0 + 0x00183> in <filename unknown>:0 
  at NuGet.Commands.Command.Execute () <0x40e581a0 + 0x0034e> in <filename unknown>:0 
  at NuGet.Program.Main (System.String[] args) <0x40e15c30 + 0x005ee> in <filename unknown>:0
Comment 10 Matt Ward 2016-07-26 22:31:48 UTC
Not sure what is going on there. Does the following url works fine for you in a browser?

https://www.nuget.org/api/v2/FindPackagesById()?id='SCVMM_MONO_REFERENCE_ASSEMBLIES'

Both the urls in the NuGet output seem OK to me.
Comment 11 Venkatrangan Govindarajan 2016-07-26 23:10:49 UTC
Works in URL,  but failes from nuget. The same works with earlier version os mono 4.2.3.
Comment 12 Venkatrangan Govindarajan 2016-07-27 01:44:45 UTC
Created attachment 16791 [details]
MONO DEBUG LOGS
Comment 13 Matt Ward 2016-07-27 09:22:48 UTC
I do not have CentOS anyway to test so I upgraded mono-complete on Ubuntu 16.04 to 4.4.1.0-0xamarin1 instead. Installing mono-complete does not install nuget so not sure where you are getting nuget from. Then if I use NuGet.exe from the mono/nuget-binary repo (2.8.7 branch) and run "nuget install SCVMM_MONO_REFERENCE_ASSEMBLIES" it works for me on Ubuntu.
Comment 14 Venkatrangan Govindarajan 2016-07-27 20:18:20 UTC
hi,

thanks for all the responses. I am suing the procedure listed in this page

http://www.mono-project.com/docs/getting-started/install/linux/

(Please check centos section)

Please  install mono-complete and nuget

I use yum install mono-complete nuget
Then try the nuget, where I am facing the issue.
Comment 15 Jo Shields 2016-07-28 13:34:09 UTC

*** This bug has been marked as a duplicate of bug 41953 ***

Note You need to log in before you can comment on or make changes to this bug.