Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top