17

I've successfully created a Nuget package which contains the compiled DLL and uncompiled content such as images, styles, etc.

Controllers, helpers, resources and other code has been compiled. This package is useful for distribution when only the compiled DLL and public stuff is required but I also want to have a package that would contain a whole source of everything.

I read the command line reference but did not find such an option (might have missed it though).

How can I package source files (.cs)?

durron597
  • 31,968
  • 17
  • 99
  • 158
mare
  • 13,033
  • 24
  • 102
  • 191

2 Answers2

8

This should guide anyone else who finds himself wanting to use Nuget to reuse the source code files into the right direction:

http://blogs.clariusconsulting.net/kzu/how-to-create-lightweight-reusable-source-code-with-nuget/

mare
  • 13,033
  • 24
  • 102
  • 191
  • 2
    An even better direction would be to use [Quarks](https://github.com/shaynevanasperen/Quarks). The reason being that NETFx is outdated and hasn't been maintained. Here's a quick description of the project: A collection of source-only [NuGet packages](https://www.nuget.org/packages?q=quarks) representing tiny bits of functionality that don't belong together in a monolithic "utility" library. These are typically delivered as self-contained source files added to your projects as internal classes that can be easily kept up-to-date with NuGet. See the GitHub project page for more information. – Shayne Aug 19 '15 at 03:23
1

In the original project (which will be the package) rename the .cs files to .cs.pp.

Lőrincz Péter
  • 160
  • 2
  • 7