Nuget on Linux: Error Getting Response Stream

NuGet on Linux: Error getting response stream

I was able to get this working by importing the certificates into the machine store and not the user store, which is the default:

$ sudo mozroots --import --machine --sync
$ sudo certmgr -ssl -m https://go.microsoft.com
$ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
$ sudo certmgr -ssl -m https://nuget.org

I verified that before I did this — even after having done the original user store-based commands — the tlstest.exe tool failed, and after importing into the machine store it succeeded.

And, most important to me of course, nuget started working then too. :)

Nuget connection attempt failed Unable to load the service index for source

You need to add proxy settings into Nuget.Config file. Refer to this link for details: Nuget Config Section & Nuget Proxy Settings.

NuGet fails to find existing package

NuGet currently has some service issues related to search and package restore functionality. It is possible this is the cause of your package restore failure.

If other dev machines are working OK, it's likely they have access to a cached version of this package.

Screenshot of status.nuget.org on 26 May

NuGet Pack -- Failed to retrieve information from remote source

The error is a bit weird, but is already mentioned here.

It looks like NuGet by default expects a packages folder at the same location as the .csproj file.

I also had a custom project structure where the .sln was located in another folder.

At least I worked around this by creating a Symbolic link like this (open cmd with admin rights):

cd <your .csproj location>
mklink /d packages "C:\path\to\actual\packages"

This way NuGet thinks the packages folder exists and should be able to create your package.

NuGet Package Restore Not Working

Note you can force package restore to execute by running the following commands in the nuget package manager console

Update-Package -Reinstall

Forces re-installation of everything in the solution.


Update-Package -Reinstall -ProjectName myProj

Forces re-installation of everything in the myProj project.

Note: This is the nuclear option. When using this command you may not get the same versions of the packages you have installed and that could be lead to issues. This is less likely to occur at a project level as opposed to the solution level.

You can use the -safe commandline parameter option to constrain upgrades to newer versions with the same Major and Minor version component. This option was added later and resolves some of the issues mentioned in the comments.

Update-Package -Reinstall -Safe

Getting no response from ProcessBuilder's input stream in some specific case

The problem here is the pipe.

You're trying to run a pipeline — a construction involving running multiple programs, that needs a shell to interpret.

But ProcessBuilder runs a single program.  In this case, it's running the program upower and passing it the parameters -i, /org/freedesktop/UPower/devices/battery_BAT1, |, grep, -E, and "present|state|energy-full|energy|energy-rate|time to empty|percentage".  Obviously upower won't know what to do with the | parameter or those after it.

You could use ProcessBuilder to run up a shell instance, which could then run your pipeline; see this answer.

But it would probably be simpler, safer, and more efficient to do the filtering in your own code, and avoid calling grep entirely.

I recommend capturing the process's error output, which would very probably have made the problem clear.



Related Topics



Leave a reply



Submit