1

I am trying to publish NuGet with source code.

I added the source code into NuGet package like this (see right panel):

enter image description here

I published it to NuGet Gallery.

Then I opened Visual Studio 2013 and type this at the NuGet Package Manager Console

PM> Install-Package MySqlBackup.NET

The Package Manager Console indicated that the installation of the package was successful:

enter image description here

However, I found that the source code files (the .cs files) was not added into the project, only the dependency of MySql.Data was added:

enter image description here

What steps did I miss?

Thanks you very much for your insights.

1
  • 2
    NuGet is not a hosting provider for source code. It's a .NET package dependency manager intended for compiled binary distribution. What you're doing may be workable but it's not the correct approach. You're better off building out a CI process and publishing the outputs of that, much like @Aybe says below. Symbol support is pretty good now in NuGet. Commented Apr 10, 2014 at 1:50

1 Answer 1

3

This is probably not the way to go, in Nuget you would publish symbols that when the user debugs his code he can step through your source thanks to these symbols.

From the official docs :

http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-symbol-package

If you look at the official docs, there is no chapter about publishing source code, just symbols.

Here's a tutorial on doing it :

http://blog.davidebbo.com/2011/04/easy-way-to-publish-nuget-packages-with.html

The common approach for publishing your source code would be on something such as GitHub.

Most of the time symbols will be sufficient if people just want to know what's happening under the hood. If they'd find a bug or would like to enhance the library they would either contact the author or fork that library.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.