-2

I have a VS2015 solution with 6 projects in it. I'd like to create a nuget package out of it but:

  • the project is for internal use only, so I don't want to publish it online
  • It should include the source code (is it possible?, not a strict requirement)
  • It should be the final artifact, can I choose a directory where to have such package?

thanks

Gianluca Ghettini
  • 11,129
  • 19
  • 93
  • 159
  • 2
    Can you explain what is unclear about [the first google hit on the topic](https://docs.nuget.org/create/creating-and-publishing-a-package)? – nvoigt Aug 16 '16 at 08:26
  • @nvoigt the fact that for every single Microsoft product there are at least 1 billion ways to do the same exact thing. And usually you have to restart VS or reboot the computer in order to make it work. That's unclear. – Gianluca Ghettini Aug 16 '16 at 08:33
  • for an example of what I'm talking about, see: http://stackoverflow.com/questions/13056329/nuget-is-not-recognized-but-other-nuget-commands-working – Gianluca Ghettini Aug 16 '16 at 08:40
  • Then ask a question about your *actual problem*. Don't expect us to spoon-feed you a step-by-step manual when you already have problems with a pretty good manual that exists. – nvoigt Aug 16 '16 at 08:52
  • @nvoigt show me the "pretty good manual" please – Gianluca Ghettini Aug 16 '16 at 08:54
  • @nvoigt so basically a manual that tells you 4 different ways of doing the same thing is a good manual? Creating a Package: From an assembly, From a project, At Build Time, From a convention based working directory, Creating a solution-level package? A good manual always starts with the "why", not with the "how". Sorry for the rant. Really required – Gianluca Ghettini Aug 16 '16 at 08:58
  • Ok so you think it's a bad manual. You still seem to be unable to create a NuGet package despite 4 ways how to do it and you are unable to actually ask a specific question. You may want to work on that. – nvoigt Aug 16 '16 at 08:59

2 Answers2

2

You can publish nuget in your private host with https://github.com/themotleyfool/Klondike.

you can use nuget Package Explorer to create nuget package. https://github.com/NuGetPackageExplorer/NuGetPackageExplorer

Umut Catal
  • 421
  • 4
  • 11
1

You have multiple options. Either you can use command prompt or Nuget Package Explorer.

In order to publish you can use Nuget official server or private Nuget server. I recommend Nexus Nuget server.

For publish official one, you need to create account and obtain api key.

You can find detailed usage in here.

  • For including source code, there is no such a thing in official one. Because it aims ready to use artifacts.
  • You can add your dll, dependencies, extra files such as configs, html etc
omer faruk
  • 350
  • 4
  • 13
  • ok thanks, could you please show me how to do it with the command prompt? For example, one silly thing I'm struggling with is that the command "nuget" is not recognized. Where is located the executable? – Gianluca Ghettini Aug 16 '16 at 08:36
  • you need to download [nuget.exe](https://dist.nuget.org/index.html) from here. There are couple ways to create nuget package. This one is creating it from csproj file `nuget pack foo.csproj -Build -Symbols -Properties Configuration=Release` then you need to publish `nuget push foo.nupkg 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -Source https://www.nuget.org/api/v2/package` In here guid value is your publish key and source is your nuget server address – omer faruk Aug 16 '16 at 11:41