Error during package install

Topics: General
Apr 18, 2013 at 8:42 PM
One of our end users is getting this error when trying to install our package (PrecogClient):
PM> Install-Package PrecogClient

Install-Package : 'Default' tag requires a nonempty 'Extension' attribute. Line 1, position 556.

At line:1 char:1

+ Install-Package PrecogClient

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Install-Package], XmlException

    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I've tried it from the command line locally and it installs fine, although I'm running this under mono:
» mono --runtime=v4.0 /home/software/dotnet/NuGet.exe install PrecogClient
Successfully installed 'PrecogClient 1.0.0'.
Not sure what the differences are between NuGet.exe and the Package Manager are, but it's unhappy.
Apr 18, 2013 at 9:03 PM
The package is corrupted. The manifest file inside it is invalid. Please upload another version and unlist the current version.
Apr 18, 2013 at 9:15 PM
You mean my .nuspec file is broken? These are the contents:
<?xml version="1.0" encoding="utf-8"?><package >
  <metadata>    <id>PrecogClient</id>
    <title>The .Net Client for Precog</title>
    <authors>ReportGrid Inc.</authors>
    <description>      This is the .Net client for Precog, a cloud-based analytics
      platform. For more information, please visit our website at This package bundles the API documentation
      under the docs subdirectory.
    <releaseNotes>This is the initial release of this client.</releaseNotes>
    <copyright>Copyright 2013</copyright>
    <tags>precog client</tags>
    <file src="bin/Debug/PrecogClient.dll" target="lib/net40" />
    <file src="bin/Debug/PrecogClient.dll.mdb" target="lib/net40" />
    <file src="docs/html/**/*" target="docs" />
Apr 19, 2013 at 2:37 PM
OK, I figured it out. I was bundling a file in the package that didn't have an extension, and NuGet was putting an entry in the [Content_Types].xml file that looked like
<Default ContentType="application/octet" Extension=""/>
This looks like a bug in NuGet. At the very least, if extension-less files are invalid in a nupkg, NuGet should error out during packaging.