Question

I just setup a private/local nuget gallery. I created my first package using the instructions mentioned in http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package

However I am getting the following error when i try to upload my package:

The package manifest contains an invalid Target Framework: ''

Any ideas?

[EDIT]

This is the nuspec file content within the package:

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
  <metadata>
    <id>EpsiDB</id>
    <version>1.0.0.0</version>
    <title>EpsiDB</title>
    <authors>Microsoft</authors>
    <owners>Microsoft</owners>
    <licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
    <projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
    <iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>This is a test package</description>
    <releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
    <copyright>Copyright 2014</copyright>
    <tags>Tag1 Tag2</tags>
    <dependencies>
      <dependency id="AntiXSS" version="4.2.1" />
      <dependency id="EntityFramework" version="6.0.2" />
      <dependency id="odp.net.managed" version="121.1.1" />
      <dependency id="odp.net.x64" version="112.3.20" />
      <dependency id="odp.net.x86" version="112.3.20" />
    </dependencies>
  </metadata>

This is the source code and what it is going wrong:

enter image description here

Was it helpful?

Solution

The problem was because of a bug in the source code. I communicated with Nuget core team and it was confirmed as a recently introduced bug which was fixed but not pushed at the time. Per grenade suggestion, I could publish my packages through Nuget.exe and I could avoid this problem altogether (because Nuget.exe wasn't built from the problematic code). However, that was not an option for me because I needed to fix the UI so other users could take advantage of the UI.

I fixed the problem myself in the Nuget source code. It was more like a serialization problem. I am sure as of now it has been fixed in the source code by the Nuget core team.

Kudos to Microsoft Nuget team for amazing support and responsiveness.

OTHER TIPS

I ran into the same issue with a local NuGetGallery. I work around this by publishing from the command line (which accepts the push without an error). Eg:

NuGet.exe push <my-package>.nupkg <my-api-key> -s http://<local-nuget-server>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top