4

I'm relatively new to managing packages using NuGet. I used Visual Studio 2008-2010 for a couple of years, and used NuGet a little, but I'm far from an expert.

I have a Visual Studio 2012 program that I did not write and I'm trying to get the program to compile under MonoDevelop 5.0.1. When I load the project into MonoDevelop, the Package Console reads:

WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
WARNING: Error: SendFailure (Error writing headers)
Unable to find version '1.4.0.56' of package 'MSBuildTasks'.
Unable to find version '2.0.0.2000' of package 'NLog'.
Unable to find version '1.2.0' of package 'NodaTime'.
Unable to find version '2.0.11' of package 'Npgsql'.
Unable to find version '2.0.0.480' of package 'protobuf-net'.
Unable to find version '2.8.4' of package 'RabbitMQ.Client'.
Unable to find version '0.15.0.0' of package 'MailKit'.
Unable to find version '0.36.0.0' of package 'MimeKit'.
Unable to find version '4.0.10827' of package 'Moq'.
Unable to find version '1.2.2' of package 'elmah.corelibrary'.
Unable to find version '5.0.6' of package 'Newtonsoft.Json'.

The application was terminated by a signal: SIGHUP

I've tried using the package manager to re-add these packages to the project, then remove the ones MonoDevelop cannot find, but I cannot get the project to recognize the packages. I've seen and read several threads on the topic some mentioning an xbuild feature that I cannot find anywhere, but those threads don't clearly address the problem, and I've found none that provide a comprehensive solution.

If there's anyone who has a comprehensive solution to this problem, please post it. I'm sure a comprehensive solution would be very helpful to a lot of people trying to convert Visual Studio projects to MonoDevelop.

Darin Peterson
  • 1,262
  • 2
  • 15
  • 25

1 Answers1

8

Try running the following:

mozroots --import --sync

That should fix the SendFailure error.

Matt Ward
  • 47,057
  • 5
  • 93
  • 94
  • I ran it and here were the results: Mozilla Roots Importer - version 3.8.0.0 Download and import trusted root certificates from Mozilla's MXR. Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed. Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1'... Importing certificates into user store... 140 new root certificates were added to your trust store. Import process completed. Unfortunately, I'm still getting the SendFailures. – Darin Peterson Sep 19 '14 at 14:37
  • And you restarted MonoDevelop? – Matt Ward Sep 19 '14 at 14:50
  • Several times to make sure that wasn't the problem. No change. – Darin Peterson Sep 19 '14 at 22:18
  • If you run `NuGet.exe restore path/to/solution.sln -verbosity detailed` from the terminal that should show the exception stack trace. NuGet can be downloaded from codeplex - https://nuget.codeplex.com/releases – Matt Ward Sep 20 '14 at 13:36
  • There is also this StackOverflow post which uses a different mozroots command line and some extra commands - http://stackoverflow.com/questions/15181888/nuget-on-linux-error-getting-response-stream – Matt Ward Sep 20 '14 at 13:38
  • Thanks for continued help with this Matt. I've not had time to get back to it. My system runs Debian Wheezy. Is there an alternative to NuGet.exe, or will that work under my OS? – Darin Peterson Sep 22 '14 at 17:44
  • From the error message you are getting it looks like it is a certificate problem. On Linux there are no trusted certificates by default which causes NuGet.exe to fail since it connects to https://nuget.org. MonoDevelop is basically doing the same as NuGet.exe when it tries to restore the packages. The only other workaround is to manually download and extract the NuGet packages - which will be a lot of manual effort, plus it will not fix the underlying problem. NuGet.exe should work on Linux, at least for restoring packages. – Matt Ward Sep 22 '14 at 22:30
  • Sorry for taking so long Matt. Just been buried in other tasks. I did run mozroots --import --sync again after updating all of my Debian packages, which did load updates to MonoDevelop, after doing that, ran Update Solution from the Version Control menu, and everything appears up-to-date now. I am only left with a project exception that is being thrown. Thank you for the help! – Darin Peterson Nov 14 '14 at 21:39
  • Not sure updating from version control had anything to do with the success, but Project --> Update Packages was also successful. – Darin Peterson Nov 14 '14 at 21:54
  • I was following ASP.NET 5 app running instructions ([ASP.NET 5](https://github.com/aspnet/home#linux)) and faced the same problem when running 'dnu restore'. This resolved my problem. Tnx – Keerthi Bandara May 03 '15 at 02:09