Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8958143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:08:47+00:00 2026-06-15T15:08:47+00:00

I am currently creating a nuget package with a nuspec file but getting the

  • 0

I am currently creating a nuget package with a nuspec file but getting the following error:

An item with the same key has already been added.

My command I am using is:

nuget pack “MyProject.csproj” -o “..\Packages”

This is my nuspec file:

    <?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <metadata>
        <id>$id$</id>
        <version>$version$</version>
        <title>$title$</title>
        <authors>$author$</authors>
        <owners>$author$</owners>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>$description$</description>
        <language>$language$</language>
    </metadata>
    <files>
        <file src="bin\MyLibrary*.dll" target="lib\net45" />
    </files>
</package>

The nuspec file I am using is also used when packaging other packages withing the same library. Could this be the reason why the above error is occurring? Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:08:48+00:00Added an answer on June 15, 2026 at 3:08 pm

    It might be that you are adding files in nuspec that are also getting added when you call pack on the .csproj (files/dlls referenced by the csproj). If so you can remove the file references from the nuspec file and give it a try.
    how does your nuspec file look like?

    I created it with the following steps
    1. create the Mylibrary project
    2. let me add a dependency, I installed ninject package to the project
    3. build
    4. nuget spec mylibrary.csproj
    5. nuspec file generated, I didn’t add any file or dependency manually to the file
    6. nuget pack mylibrary.csproj
    7. nuget pack would automatically add ninject as a dependency and also add mylibrary.dll into the correct folder
    8. http://npe.codeplex.com/ is a nice tool to open the nupkg file and see what got generated inside the package.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im currently creating an app for honeycomb, but i'm getting significant problems i'm suspecting
I am currently creating a directory based on file names and then moving the
I am currently creating an application that has a user, the user can follow
I am currently creating a PDF document which has fields on it which I'd
I am currently creating a website in php that has a database backend (can
im currently creating a graph for an app, using coreplot and have a problem
I am currently creating an application for compiling multiple java projects in one go
I'm currently creating a payment SDK for android, as such I want to send
I'm currently creating an iPhone app (Xcode 4.3.1, IOS 5) that could use Bluetooth
I'm currently creating a iOS 5 iPad app where there will be heavy network

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.