State of NuGet on Mono

Topics: General
May 11, 2013 at 12:25 AM
Firstly, as seen here: NuGet requires Mono > 3.x.
My distro packaged 2.x, so I downloaded the latest source for Mono:
However I ran into the issue seen here:
So, I grabbed the latest mono source from git. That compiled and installed cleanly.

Now trying to build nuget, I ran into expected issues with test cases not passing. Editing
-xbuild Build/Build.proj /p:Configuration="Mono Release" /t:GoMono
+xbuild Build/Build.proj /p:Configuration="Mono Release" /t:GoMonoNoTests
To not run tests made the build complete successfully.

nuget install worked great

nuget spec <assembly> worked, but the resulting nuspec was missing a trailing newline.

nuget pack worked, except that colored warning lines were corrupted. Setting TERM=dumb worked around this issue. Maybe a --no-color option is in order.

nuget push worked correctly.

I did not run into many of the issues reported in the issue tracker. Example:

patch to add a trailing newline to .nuspec:
From 674689f82af34703131d6af333c272a082db53fa Mon Sep 17 00:00:00 2001
From: Jeff Mendoza <>
Date: Fri, 10 May 2013 17:05:03 -0700
Subject: [PATCH] Add trailing newline to nuget spec output.

 src/Core/Authoring/Manifest.cs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Core/Authoring/Manifest.cs b/src/Core/Authoring/Manifest.cs
index 2d022d6..5882b0d 100644
--- a/src/Core/Authoring/Manifest.cs
+++ b/src/Core/Authoring/Manifest.cs
@@ -74,6 +74,9 @@ namespace NuGet
             // Need to force the namespace here again as the default in order to get the XML output clean
             var serializer = new XmlSerializer(typeof(Manifest), schemaNamespace);
             serializer.Serialize(stream, this, ns);
+            var sr = new StreamWriter(stream);
+            sr.Write("\n");
+            sr.Flush();
         public static Manifest ReadFrom(Stream stream, bool validateSchema)

Jun 11, 2013 at 8:43 AM
I you sure you have to fix NuGet? May be need to fix Mono, Mono xml serializers have to behave exactly as .NET counterparts.
Jun 11, 2013 at 10:24 PM
True, I did not check the behavior of the .NET serializer to see if it is the same as Mono.
Feb 15, 2014 at 4:51 PM
Edited Feb 15, 2014 at 4:52 PM
What version of mono did you test with because 'nuget pack' fails for me with this bug on mono 3.2.6?